Summary
This episode explores C++17's enhanced aggregate initialization features that now support initialization of base classes. Jason demonstrates the evolution of struct initialization across C++ standards using Compiler Explorer, from C++03's constructor requirement, through C++11's uniform initialization syntax with braces, to C++17's ability to initialize derived classes with base class members. He shows how the new syntax allows developers to specify base class member values in aggregate initialization, which was previously not possible without explicit constructors.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[dcl.init.list]69% match -
[dcl.init.aggr]66% match