Variations on Variants
Offered By: CppNow via YouTube
Course Description
Overview
Explore the intricacies of std::variant in C++ through this comprehensive conference talk from CppNow 2021. Delve into the rationale behind std::variant as a type-safe alternative to C's union, examining typical usage patterns and implementation details. Gain insights into memory layout and runtime performance implications. Investigate key differences between std::variant and union, focusing on serialization use cases where unions excel but std::variant falls short. Discover innovative approaches to address these limitations, including Intrusive-Variant and Variant-of-Base techniques. Examine the C++ standard's stance on unions and their potential pitfalls. Learn about counterintuitive applications of std::variant, such as a simple mechanism for de-virtualization. Equip yourself with the knowledge to modernize existing low-level C-style code and deepen your understanding of variant internals in this 1 hour 31 minute presentation by experienced software developer and architect Roi Barkan.
Syllabus
Variations on variants - Roi Barkan - [CppNow 2021]
Taught by
CppNow
Related Courses
Circle Metaprogramming - Better Features Make Better LibrariesCppNow via YouTube Implementing Variant Visitation Using Lambdas
CppNow via YouTube Generic Programming Without Writing Your Own Templates
ACCU Conference via YouTube Effective Replacement of Dynamic Polymorphism with std - variant
ACCU Conference via YouTube Implementing Variant Visitation Using Lambdas
ACCU Conference via YouTube