arnuld uttre wrote:
At the company where I work, its decided by higher authority that we will use C since our software will run on some embedded platforms and for embedded platforms C++ is not a good idea. Reading Stroustrup's FAQs tells me the opposite: http://www.research.att.com/~bs/bs_faq.html I am implementing a Priority-Queue (PQ) in C but I see C++ already has a template, a generic PQ implemented in Std. Lib. Hence I am not much interested in code-duplication, I am not interested in doing a work which has already been done in a much better than I will ever do. We are using gcc for our embedded platform, now I don't get it if gcc works on embedded platform then why can't we use use g++ ? The embedded platforms we are working on will mostly be *NIX or much less vxWorks and very rarely something Windows based. Has anyone worked on embedded platforms before, may be he can tell if we can use templates over there and any other information will be appreciated.
What you have is a political problem not a technical problem. g++ can and has been used to generate code for embedded devices.
Personally I have deployed C++ code compiled by g++ on mips-linux systems deployed in consumer electronic devices (television sets). This included use of exceptions, templates, and many of the standard C++ library facilities. The argument that C++ will not run on embedded devices is false.
David Daney