Peter Sommerlad - What Classes We Design and How - Meeting C++ 2021

1 Views
Published
Peter Sommerlad - What Classes We Design and How - Meeting C++ 2021
Slides: https://slides.meetingcpp.com
Survey: https://survey.meetingcpp.com

What special member functions should you declare or define in your class types? Are you always sure? Is defaulting or deleting a special member function the right thing to do, or does the Rule of Zero rule? Will we always have to consult Howard Hinnants table from ACCU 2014?

From the plethora of compiling combinations of special member functions, this talk will introduce a sane sub-set and give each combination a reason when and where it applies. It will further demonstrate how the kind of base types or non-static data members effect the availability of the operations that a semi-regular/(14^h) normal-behaving type should allow.

We will try to demystify move operations, know why and how we manage resources, and understand how const and reference data members hinder assignability, and what to do about it. Also the mysterious contagiousness of relationship types (aka pointers et al) will be discussed.
Category
Management
Be the first to comment