Class Layout - Miloš Anđelković - Meeting C++ 2023

Published: 10 January 2024
on channel: Meeting Cpp
2,001
60

Class Layout - Miloš Anđelković - Meeting C++ 2023
Slides: https://slides.meetingcpp.com
Survey: https://survey.meetingcpp.com

It's a regular thing to write a class that will later be used in various ways trough the application. But how often do we stop and thing about what the compiler does with it, what the compiler can do with it, and finally how the class ends up looking in memory. To novice programmers there are some rules and behaviors that might be surprising. Here we will take a stroll trough the C++ documentation and see what the compiler is allowed, by law, to do, define some terms, see what tools we can use to peek under the hood and better understand our code. All of this of course accompanied with some simple examples because seeing is believing. And finally this entire exercise would be useless unless we see what actual impact this has on performance.

This is intended to be beginner friendly so it will not cover every edge case and things like virtual inheritance and vtable pointers, but even more experienced programmers might find some interesting nuggets of information.


Watch video Class Layout - Miloš Anđelković - Meeting C++ 2023 online without registration, duration hours minute second in high quality. This video was added by user Meeting Cpp 10 January 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,001 once and liked it 60 people.