gcc/testsuite/g++.dg/cpp2a/nontype-class11.C
raw| 1 | // PR c++/88538 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct S { |
| 5 | unsigned a; |
| 6 | unsigned b; |
| 7 | constexpr S(unsigned _a, unsigned _b) noexcept: a{_a}, b{_b} { } |
| 8 | }; |
| 9 | |
| 10 | template <S p> |
| 11 | void fnc() |
| 12 | { |
| 13 | } |
| 14 | |
| 15 | template<S s> struct X { }; |
| 16 | |
| 17 | void f() |
| 18 | { |
| 19 | fnc<{10,20}>(); |
| 20 | X<{1, 2}> x; |
| 21 | } |