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

--- Comment #2 from Matheus Izvekov <mizvekov at gmail dot com> 2013-04-18 
08:10:19 UTC ---
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} };

Compiling this gives a similar error:

test.cc:12:64: error: ‘const std::initializer_list<foo>{((const foo*)(&
_ZGRL3bad0)), 2u}’ is not a constant expression

Reply via email to