same as the topic.
15 years ago a lot of the developers told us the same about C. They could not imagine the there could be something other than assembler. Tasking already offers a ec++ compiler for the C166-Family (included in the standard package!). By ...Leo
"Tasking already offers a ec++ compiler for the C166-Family..." You might want to benchmark the Tasking C++ compiler before jumping in. An evaluation version can be had. My results caused me to buy the Keil tools. Classes, inheritence, polymorhism; For code which would be more smoothly handled in C++ (screen object handling, com port interfaces, ...) I put in a structure ID member and have a 'this' pointer argument passed in the functions. Is it more work, yes, but at least I see the code and run-time overhead and can eliminate it when it isn't needed. Operator overloading; Most compilers I have studied handle operator overloading as a function call, possibly using indirect function call tables for the simplest types. The overhead can make simple addition a deadly time-hog. Templates; In my opinion, templates are the single largest cause of bloated code which is anathema to embedded programming with it's space and time constraints and reliablity requirements. PS. To include a 'this' pointer;
typedef struct CPP_STRUCT { struct CPP_STRUCT *p_This; ... int (*member_Fcn)(struct CPP_STRUCT *p_This); } CPP_STRUCT;