From Jason Turner
Watch on YouTube

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.

Resources

Tags