Loading…
CppCon 2020 has ended
Back To Schedule
Monday, September 14 • 13:30 - 14:30
Back to Basics: Class Layout

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
In C++, as in many other languages, classes are the key feature that supports data abstraction. A C++ class is essentially a C structure, but with added capabilities that support object-oriented programming as well as better type safety, resource management, and usability.

Although some of these added capabilities require additional storage allocation or run-time support, most do not. Thus, the storage layout for a C++ class can be as simple as the layout for a C structure. Unfortunately, too many programmers imagine that classes incur space and speed penalties that simply aren’t there.

This session offers a practical look “under the hood” to see how compilers typically implement the storage layout and member access for C++ classes. It also explains how compilers typically implement member function calls. You’ll come away with a better sense of what using classes actually costs in speed and space. You’ll gain insights that will help you with a variety of programming tasks, including debugging, performance tuning, and working with objects that have rigid layout requirements.

Speakers
avatar for Stephen Dewhurst

Stephen Dewhurst

President, Semantics Consulting, Inc.
Steve Dewhurst is the co-founder and president of Semantics Consulting, Inc. Steve is the author of numerous technical articles on C++ programming techniques and compiler design, is the author of the critically acclaimed books C++ Common Knowledge and C++ Gotchas, and is the co-author... Read More →


Monday September 14, 2020 13:30 - 14:30 MDT
Back to Basics