Multiple ChoiceIntermediate 45s
Aggregate initialization rules
Which class qualifies as an aggregate in C++17 (eligible for brace aggregate init)?
Options
- 1Any class at all, as long as it happens to declare some form of default constructor.
- 2One with no user-provided/deduced constructors, no private/protected non-static data members, no virtual functions, and no virtual/private/protected base classes.
- 3Any class whose members are all public, even if it declares its own user-defined constructors.
- 4Only POD structs that have no constructors of any kind and whose members are all trivial.
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.