r/cpp • u/meetingcpp Meeting C++ | C++ Evangelist • Sep 24 '26
About alignment, struct layout and the cache...
https://meetingcpp.com/blog/items/About-alignment--struct-layout-and-the-cache---.html
36
Upvotes
View all comments
Show parent comment
1
u/yuri-kilochek Sep 27 '26
You can wrap each member in an anonymous union to suppress automatic construction/destruction and construct/destruct manually in any order.