gcc/testsuite/g++.dg/cpp2a/nontype-class55.C
raw| 1 | // PR c++/102553 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct s1{}; |
| 5 | template<int> inline constexpr s1 ch{}; |
| 6 | |
| 7 | template<s1 f> struct s2{}; |
| 8 | template<s1 f> using alias1 = s2<f>; |
| 9 | |
| 10 | template<class T> |
| 11 | void general(int n) { |
| 12 | alias1<ch<1>>{}; |
| 13 | } |
| 14 | |
| 15 | template void general<int>(int); |