gcc/testsuite/g++.dg/cpp0x/constexpr-56991.C
raw| 1 | // PR c++/56991 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | #include <initializer_list> |
| 5 | |
| 6 | constexpr std::initializer_list<int> good1 = { 1, 2, 3 }; |
| 7 | struct foo { int a, b; }; |
| 8 | constexpr foo good2 = { 1, 2 }; |
| 9 | |
| 10 | constexpr std::initializer_list<foo> bad1 = { { 1, 2 }, { 3, 4} }; |
| 11 | constexpr std::initializer_list<foo> bad2 = { good2, good2 }; |