This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36943] New: Use of nested C++0x initializer list for non-aggregate rejected
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2008 23:32:25 -0000
- Subject: [Bug c++/36943] New: Use of nested C++0x initializer list for non-aggregate rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
C++0x-style initializer list support was recently added, but the following
valid code is rejected:
struct p { p(int, int); };
p a[] = { { 3, 2 } };
With -std=c++0x, the second line results in:
error: braces around scalar initializer for type 'p'
--
Summary: Use of nested C++0x initializer list for non-aggregate
rejected
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36943