How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Your buffer is not a struct yet -- Mateusz Pusz

calendar_today November 5, 2026 person Mateusz Pusz domain cplusplus

The third installment in Mateusz Pusz’s series on C++ rules experienced developers quietly get wrong, this one works through when casting a byte buffer to a struct is undefined behavior and when it is not, using C++20 implicit-lifetime types and implicit object creation, and the C++23 std::start_lifetime_as for the remaining case. Your buffer is not a struct yet by Mateusz Pusz Published so far: The C++ fundamentals your seniors think they know Your pointer still remembers the old object From the article: Whether casting a buffer to a struct is undefined behavior depends on two things: whether

open_in_new Read original post