Designing Value Classes for Modern C++
summary
Covers principles for designing value classes in modern C++, discussing how to implement safe, efficient value semantics using C++11/14 features such as move semantics, constexpr, and noexcept. Explains trade-offs in copy vs. move, resource management, and API design to make value types predictable and performant.
AI-written summary · about
chapters (26)
- 0:00Start
- 0:28Types of Classes
- 2:14What R Value Classes
- 6:24Handle Classes
- 7:35Polymorphic Classes
- 8:26Types of Value Classes
- 9:13Thin Abstractions and Thick Abstraction
- 11:41Thin Abstractions
- 13:23C++11 Features
- 15:12Literal Type
- 15:36Constructive Consecration Constructors
- 18:59Implicit Conversion
- 20:08Initializer List
- 21:26Move Semantics
- 23:43Standard Hash
- 24:22What Happens to the New Containers
- 27:42Questions
- 29:51Value Class Design
- 30:17Mark Them as Final
- 30:43Making the Type Immutable for all Value Classes
- 40:42Demo
- 43:38Creating Your Own Swap Function
- 54:23Provide User-Defined Inline Move Constructors and Assignment Operators
- 56:36Class Invariants
- 57:41Mixed Approach
- 58:49Library Versioning
related talks
52mClasses C++23 Style
01h 01mBack to Basics: Concepts in C++
01h 04mC++ Concepts
54mA Tour of C++ Recognised User Type Categories
01h 03mTemplates Made Easy with C++20
01h 04mBack to Basics: Object-Oriented Programming in C++
49mTypical C++, But Why?
01h 02mBack to Basics: Forwarding References - How to Forward Parameters in Modern C++
