Embracing PODs Safely Until They Die
summary
Deep dive into when C++ types really behave like C data and what can go wrong with concrete code and working demos. Shows a concrete reinterpret_cast trick that relies on standard-layout guarantees to read private members, a tested double ganger union pattern to produce a C-compatible struct copy passed into C, and precise distinctions between trivially copyable and trivially copy_constructible. Examples compile and run but are explicitly labeled conditionally safe and brittle if triviality or lifetime rules change.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:38Book
- 1:47What does it do
- 3:38Structure
- 5:28PODs
- 6:42Plain Old Data
- 14:50Use Cases
- 23:03POD Definitions
- 26:20Use Case
- 43:45Trivia
- 47:38walkthrough
- 49:29highlights
- 51:08what to keep in mind
- 52:28questions
related talks
01h 02mEmbedded Friendly C++: Features That Make a Difference
58mLeveraging C++20/23 Features for Low Level Interactions
07mType punning done right
01h 30m50 shades of C++
01h 10mAn Overview of C++11/14, Part II
44mThis is why we can('t) have nice things
01h 01mException-Safe Code, Part I
01h 03mWriting sustainable software. The how and the what!
