This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

will you deliver a C++51? (No content)

same as the topic.

Parents
  • "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;
    
    The first tag allows use of the pointer type inside the structure while the last tag acts as a type.

    Best luck

Reply
  • "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;
    
    The first tag allows use of the pointer type inside the structure while the last tag acts as a type.

    Best luck

Children
No data