Affected subclause: [dcl.init.aggr]
Change: Definition of an aggregate is extended
to apply to user-defined types with base classes
. Rationale: To increase convenience of aggregate initialization
. Effect on original feature: Valid C++ 2014 code may fail to compile or produce different results in this
International Standard; initialization from an empty initializer list will
perform aggregate initialization instead of invoking a default constructor
for the affected types
. For example:
struct derived;
struct base {
friend struct derived;
private:
base();
};
struct derived : base {};
derived d1{};
derived d2;