Summary
This episode examines a subtle language change in C++20 that affects aggregate initialization. Jason demonstrates how in C++17, structures with user-defined constructors can still use aggregate initialization (direct member initialization with braces), creating potential inconsistency in initialization rules. C++20 fixes this by prohibiting aggregate initialization for any type with user-defined constructors, making initialization behavior more predictable and consistent.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[dcl.init.aggr]67% match