You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An array of unknown bound initialized with a brace-enclosed initializer-list containing ninitializer-clauses, where n shall be greater than zero, is defined as having n elements.
The "where n shall be greater than zero" is unnecessary, as an initializer-list is never empty, and as such, a brace-enclosed initialize-list always has at least one element.
The restriction is also mentioned a bit later:
An empty initializer list {} shall not be used as the initializer-clause for an array of unknown bound.
I don't quite understand it (what initializer-clause?), but it seems to also disallow int a[] = {};.
The text was updated successfully, but these errors were encountered:
[dcl.init.aggr]p9 says this:
The "where
n
shall be greater than zero" is unnecessary, as an initializer-list is never empty, and as such, a brace-enclosed initialize-list always has at least one element.The restriction is also mentioned a bit later:
I don't quite understand it (what initializer-clause?), but it seems to also disallow
int a[] = {};
.The text was updated successfully, but these errors were encountered: