http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56991

--- Comment #4 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Matheus Izvekov from comment #2)
> I get also a similar bug:
> 
> #include <initializer_list>
> 
> //is accepted by gcc
> constexpr std::initializer_list<int> good1 = { 1, 2, 3 };
> 
> struct foo { int a, b; };
> 
> //still ok
> constexpr foo good2 = { 1, 2 };
> 
> //gcc rejects this
> constexpr std::initializer_list<foo> bad = { { 1, 2 }, { 3, 4} };

A variation of the last line also produces the same error:

constexpr std::initializer_list<foo> bad2 = { good2, good2 };

I can confirm that the error also occurs for the trunk, tested with gcc 4.9.0
20130519 (experimental).

Reply via email to