This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
1270. Brace elision in array temporary initializationSection: 9.5.5 [dcl.init.list] Status: CD3 Submitter: Jason Merrill Date: 2011-03-23[Moved to DR at the October, 2012 meeting.]
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.5.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 }; }
Proposed resolution (February, 2012):
Change 9.5.2 [dcl.init.aggr] paragraph 11 as follows:
In a declaration of the form
T x = { a };
braces Braces can be elided in an initializer-list as follows. [Footnote: Braces cannot be elided in other uses of list-initialization. —end footnote]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4