Categories

Jan 4 in C++
Q: Aggregate member initialization C++ 14 features

1 Answer

Jan 4
C++11 added member initializers, expressions to be applied to members at class scope if a constructor did not initialize the member itself. The definition of aggregates was changed to explicitly exclude any class with member initializers; therefore, they are not allowed to use aggregate initialization.

C++14 relaxes this restriction, allowing aggregate initialization on such types. If the braced init list does not provide a value for that argument, the member initializer takes care of it.
Click here to read more about C++
Click here to read more about Insurance

Related questions

Madanswer
Jan 4 in C++
Jan 4 in C++
Jan 2 in C++
...