Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore a comprehensive lecture on creating safe and sane C++ class types in this C++Now 2019 conference talk. Delve into the evolution of C++ special member functions, from the "Rule of Three" to the "Rule of Five/Six" and "Rule of Zero". Examine Howard Hinnant's table on language rules for special members and learn a consistent approach to defining and declaring special members for different class types. Discover surprising suggestions aimed at reducing code clutter and improving software quality. Cover topics such as typical problems in C, use after free, regular types, builtin types, default constructible classes, type traits, empty base class optimization, unique pointer types, and inherited constructors. Gain insights from Peter Sommerlad, Professor at IFS Institute for Software, on creating more efficient and safer C++ code.
Syllabus
Introduction
Typical problems in C
Use after free
Safe and sane
Class types
Special member functions
Regular types
Other types
Builtin types
Default constructible
Empty classes
Examples
Traits
Type Traits
Compute New Types
No Bloat
Empty Base Class Optimization
Unique Pointer Types
Inherited Constructors
Hanging
Safety
Taught by
CppNow