gcc/testsuite/g++.dg/cpp0x/initlist119.C
raw| 1 | // PR c++/93559 - ICE with CONSTRUCTOR flags verification. |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct E { int d[10]; }; |
| 5 | |
| 6 | struct S { |
| 7 | constexpr int operator()(char) { return 42; } |
| 8 | }; |
| 9 | |
| 10 | template <typename> struct X { |
| 11 | constexpr static E foo(S s) { return {{s(1)}}; } |
| 12 | }; |
| 13 | |
| 14 | S s; |
| 15 | static_assert((X<S>::foo(s), 1), ""); |