Embedded-Friendly C++: Features That Make a Difference

Speaker: Andreas Fertig

Audience level: 6

C++ is used in many different fields. One that sticks out is the embedded domain, you're often working with tight constraints. Writing software is challenging and fun at the same time.

What has C++ done to support this field? What new options do you have to avoid undefined behavior, write more efficient and robust code?

In this talk, I will present various library elements as well as language improvements that make writing embedded software better.

We'll look at real-world tasks like turning raw byte blobs into usable data structures, aka type punning, of course, without triggering undefined behavior. C++26 supports you in a new way with std::start_life_time_as. I'll explore that new library function with you, including solutions for pre C++26.

Transferring data via a network comes with its own challenges. You have to care about the byte order. Oh, and how can you make sure that there are no padding bytes included? Well, I have an answer for you.

By the end of this talk, you know the most important improvements in C++ for embedded or similar environments.