C++ usage in embedded systems

后端 未结 17 1526
南旧
南旧 2021-01-30 22:45

What features of C++ should be avoided in embedded systems?

Please classify the answer by reason such as:

  • memory usage
  • code size
  • speed<
17条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 23:15

    It's an interesting read for the Rationale on the early Embedded C++ standrard

    See this article on EC++ as well.

    The Embedded C++ std was a proper subset of C++, i.e. it has no additions. The following language features were removed:

    • Multiple inheritance
    • Virtual base classes
    • Run-time type information (typeid)
    • New style casts (static_cast, dynamic_cast, reinterpret_cast and const_cast)
    • The mutable type qualifier
    • Namespaces
    • Exceptions
    • Templates

    It's noted on the wiki page that Bjarne Stroustrup says (of the EC++ std), "To the best of my knowledge EC++ is dead (2004), and if it isn't it ought to be." Stroustrup goes on to recommend the document referenced by Prakash's answer.

提交回复
热议问题