Embedded Friendly C++: Features That Make a Difference
summary
Concrete code: parsing MAC strings into a strongly typed array, packing floats into FP16, asserting no-padding with has_unique_object_representations, and switching compile/run behavior with if consteval and constinit. The talk shows library fixes not promises: std::bit_cast for safe type punning, std::expected for value+error returns, and a new zero‑copy path using std::start_lifetime_as that is implemented in recent GCC but needs extra compiler support elsewhere. Examples compile and run, with caveats about past UB and portability.
AI-written summary · about
chapters (13)
- 0:00Embedded friendly C++ features
- 2:07Simple embedded light bulb system
- 6:45No padding in data structures C++17
- 8:50Debug compile-time vs runtime C++20
- 13:25Convert strings to MAC addresses C++20
- 17:42Error handling with std::expected C++23
- 22:41Safe type punning with std::bit_cast C++20
- 27:14Efficient enum to string mapping C++23
- 31:52Zero-copy network data reception C++23
- 36:33Handling endianness in network
- 40:28Custom deleters for unique_ptr C++20
- 47:28Optimizing lambda call operators C++23
- 51:07Q&A
related talks
58mLeveraging C++20/23 Features for Low Level Interactions
23mFunctional Programming in C++ (Run time vs Compile time types)
01h 30m50 shades of C++
02h 02mPeering forward: C++'s next decade
01h 01mEmbracing PODs Safely Until They Die
01h 01mFreestanding C++ - Past, Present, and Future
01h 30mC++ in Constrained Environments
01h 00mC++20 - the hidden pearls
