“Enhanced Support for Value Semantics in C++17”
summary
Covers concrete C++17 additions: std::optional (holds T in-place, adds nullopt_t, value_or copies/moves the contained T), std::variant (type-safe union, stores largest alternative in-place, supports visit/get/get_if, can become valueless_by_exception if a type-change throws, monostate provides an explicit empty alternative), and std::any (type-safe void*, usually heap-allocates, checked any_cast). Recommends preferring optional then variant then any and notes mpark::variant backport for pre-C++17.
AI-written summary · about
chapters (7)
- 0:00Introduction to the topic
- 0:56Values versus objects
- 7:03Optional in C++17
- 27:47Variant in C++17
- 43:32Any in C++17
- 48:51Comparison and summary
- 51:10Q&A session








