gcc/testsuite/g++.dg/cpp0x/initlist-value3.C
raw| 1 | // PR c++/89119 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | struct S { int a[4]; }; |
| 5 | |
| 6 | template<int N> |
| 7 | struct R { int a[N]; }; |
| 8 | |
| 9 | template <typename T> |
| 10 | void |
| 11 | fn () |
| 12 | { |
| 13 | constexpr auto s = S(); |
| 14 | constexpr auto s2 = S{}; |
| 15 | constexpr auto r = R<4>(); |
| 16 | constexpr auto r2 = R<4>{}; |
| 17 | } |
| 18 | |
| 19 | void |
| 20 | foo () |
| 21 | { |
| 22 | fn<int>(); |
| 23 | } |