Created on 2016-11-16.00:00:00 last changed 81 months ago
Proposed resolution:
This wording is relative to N4606.
Change [array.overview] p2 as indicated:
-2- An array is an aggregate ([dcl.init.aggr]) that can be list-initialized with up to N elements
whose types are convertiblethat can be implicitly converted to T.
[ 2018-3-14 Wednesday evening issues processing; priority to 3; move to Open ]
Jens: There's nothing you can do about the double braces in std::array. That's a core thing.
STL to write paper to resolve this.
[ 2017-01-27 Telecon ]
Priority 2; consensus is that the P/R is not quite right.
[ 2016-11-26, Tim Song comments ]
This is not possible as written, because due to the brace elision rules for aggregate initialization, std::array<int, 2> arr{{0}, {1}}; will never work: the {0} is taken as initializing the inner array, and the {1} causes an error.
LWG 2590's resolution is incomplete:
std::array<int, 1> arr{{0}};
should be fine, but isn't guaranteed, since {0} has no type. We should rather go for implicit conversion:
An array is an aggregate ([dcl.init.aggr]) that can be list-initialized with up to N elements
whose types are convertible to Tthat can be implicitly converted to T.
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-03-19 00:12:24 | admin | set | messages: + msg9762 |
2018-03-19 00:12:24 | admin | set | status: new -> open |
2017-01-30 15:17:53 | admin | set | messages: + msg8800 |
2016-11-26 21:23:46 | admin | set | messages: + msg8693 |
2016-11-26 20:38:46 | admin | set | messages: + msg8692 |
2016-11-16 00:00:00 | admin | create |