C++
developers, architects
3 days
lecture
workshop

Every month more and more embedded C projects switch to the C++ programming language. This trend is caused by the fact that C++ tends to be faster and provide much better and safer abstractions without sacrificing either the performance or ability to control underlying hardware.

Embedded development is a specific subject. In most cases, due to underlying small factor physical architectures, embedded projects cannot use C++ exceptions and have problems with dynamic memory usage. That makes most parts of C++ Standard Library unusable in that domain. Also, most C developers have a good understanding of pointer types, and that is why pointers are overused by them in the C++ code causing a lot of stability and security issues. It is essential for embedded engineers to understand the basics of so-called Modern C++ which makes the language much friendlier, easier, and safer to use.

C++ is a big and complicated programming language, and that is why it is often not easy for embedded C developers to master it. That training was built from the ground up with such an audience in mind. It covers only a common subset of Modern C++ and the features that can be used in the embedded programming. It also addresses significant differences between C and C++ programming languages. Upon completing that training, every embedded engineer knows how to use C++ templates to create powerful abstractions that are easy and safe to use, but hard to abuse.

This training should be considered a mandatory training for all embedded C++ engineers and code architects.

TRAINING HIGHLIGHTS

  • Emphasis on understanding the philosophy and mechanisms of C++ programming language and learning how to reuse this knowledge in own code
  • A detailed description of the differences between C and C++ programming languages with the focus on the embedded development
  • Particular focus on the usage of C++ templates in practical tasks
  • Development of error-unfriendly code
  • Selection of useful patterns and techniques that prove in an embedded production code

TRAINING AGENDA

The following plan is an initial proposal of the training material. The final agenda is always created based on the individual pre-training analysis of client's requirements and constraints.

  1. C++ Basics for Embedded Developers
    1. Identifiers
    2. Pointers vs references
    3. C++ types and their properties
    4. Value categories
    5. Automatic type deduction
    6. Type conversions
    7. Alignment
    8. Namespaces
    9. Scope
    10. Lifetime
    11. Storage duration
    12. Dynamic memory management
    13. Stack vs Heap vs Free Store
    14. new/delete vs malloc/free
    15. Initialization
    16. Name lookup
    17. Range-based for loop
    18. User-defined literals
    19. Default function parameters
    20. Structured binding
    21. Mixing C and C++
  2. Introduction to C++ performance
    1. Copy elision
    2. Rvalue references
    3. Move Semantics
    4. noexcept
    5. constexpr
  3. Classes
    1. Static vs regular members
    2. Access control and friends
    3. Special member functions
    4. Rule of Three, Five, Zero
    5. Operator overloading
    6. inline
    7. Unions in C++
    8. Inheritance and Polymorphism
    9. Unscoped vs scoped enumerations
  4. Introduction to C++ Templates
    1. Class, function, variable, and alias templates
    2. Parameters
    3. Partial and Full specialization
    4. Variadic templates
    5. Fold-expressions
    6. Dependent names
  5. Good practices and useful tools
    1. RAII
    2. Lambda expression
    3. Algorithms
    4. Strong Types
    5. Reference types
    6. Pointless Pointers
    7. [[nodiscard]]
C++
developers, architects
3 days
lecture
workshop

Trainer

Mateusz Pusz
FOUNDER / C++ TRAINER