Created on 2011-03-23.00:00:00 last changed 130 months ago
[Moved to DR at the October, 2012 meeting.]
Proposed resolution (February, 2012):
Change 9.4.2 [dcl.init.aggr] paragraph 11 as follows:
In a declaration of the form
T x = { a };
bracesBraces can be elided in an initializer-list as follows.[Footnote: Braces cannot be elided in other uses of list-initialization. —end footnote]
Issue 1232 extended the language to allow creation of array temporaries using initializer lists. However, such initializer lists must be “completely braced;” the elision of braces described in 9.4.2 [dcl.init.aggr] paragraph 11 applies only
In a declaration of the form
T x = { a };
This restriction prevents plausible uses like
array<int, 3> f() { return { 1, 2, 3 }; }
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-05-03 00:00:00 | admin | set | status: dr -> drwp |
2012-11-03 00:00:00 | admin | set | messages: + msg4147 |
2012-11-03 00:00:00 | admin | set | status: ready -> dr |
2012-02-27 00:00:00 | admin | set | messages: + msg3723 |
2012-02-27 00:00:00 | admin | set | status: drafting -> ready |
2011-03-23 00:00:00 | admin | create |