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 n initializer-clauses, where n shall be greater than zero, is defined as having n elements ([dcl.array]).
An array bound may also be omitted when the declarator is followed by an initializer or when a declarator for a static data member is followed by a brace-or-equal-initializer ([class.mem]). In both cases the bound is calculated from the number of initial elements (say, N) supplied ([dcl.init.aggr]), and the type of the identifier of D is “array of N T”.
[dcl.init.aggr]/9:
[dcl.array]/3:
[expr.type.conv]/2:
Consider
Should
r
have typeint(&&)[2]
orint(&&)[]
(or be ill-formed, sinceT
is an incomplete type)?[dcl.init.aggr]/9 seems to imply that the array bound is deduced in this case, but [dcl.array]/3 and [expr.type.conv]/2 seem more ambiguous.
All compilers I tested say that
r
has typeint(&&)[2]
.The text was updated successfully, but these errors were encountered: