Seminar: Embedded C++ and AUTOSAR C++ 14

This description is still provisional and will be revised.

In this seminar, the language elements of C++ (especially C++11, C++14 and C++17) will be presented from the point of view of the special embedded requirements together with the AUTOSAR C++14 rules. In January 2019 Misra announced that the Misra C++ and Autosar rules will be combined to a common set of rules based on C++17.

In this seminar, the language elements of C++ are presented from the point of view of the special embedded requirements and compared with C alternatives.

Goal of the seminar:

Embedded programs are often characterized by particular limitations, such as small memory, do not use a heap (to avoid memory fragmentation), etc. In addition, there are often special requirements such as high speed, high reliability, etc.

Traditionally, embedded programs are often written in C. With modern C ++ compilers, most language elements today have no more disadvantages compared to C. The new C ++ standards have introduced new language elements in C ++ that lead to faster and smaller code than the C alternatives.

One of the key arguments for C ++, however, is that embedded programs are becoming increasingly complex and larger. This complexity is often difficult to manage with C’s resources. Here C ++ offers advantages that save development costs and contribute to the reliability of the applications.

One focus of this seminar is on C ++ concepts that have no direct equivalent in C. These are discussed in detail using the AUTOSAR C ++ 14 rules.

Prerequisite: Good C and C ++ skills – this course is not an introduction to C ++.

Program (still provisional, will be revised)

  • Elementary data types and instructions
    • Integer data types of fixed width
    • Separator for number literals and binary literals
    • Strongly typed enumeration types
    • Type inference: implicit type assignments with auto
    • Secure conversions with initialization lists
    • inline variables, especially static inline data elements
    • Constants with const and constexpr
    • Init statement for if / switch
    • Conditional compilation with if constexpr
    • Arrays and std :: array
  • namespaces
  • Overloaded functions and operators
  • classes
    • Member functions and the this pointer
    • data encapsulation
    • Constructors and destructors
    • Elementinitialisierer
    • Default constructor, copy constructor, assignment operator
    • The information = delete and = default
    • Inheritance and composition
    • Virtual functions and polymorphism
    • R-value references and move semantics
  • Exception handling
    • try / catch and stack unwinding
    • RAII
    • noexcept
  • Functors, function objects and lambda expressions
  • Templates
    • Function Templates
    • Class Templates
  • The C ++ Standard Library
    • The STL and the Embedded Template Library etl
    • std :: vector and std :: array
    • Sequential and associative containers
    • Algorithms and parallel algorithms
    • Polymorphism without pointer: std :: visit and std :: variant
    • Optional return values ​​with std :: optional