gcc/testsuite/g++.dg/cpp1z/nontype-auto25.C
raw| 1 | // PR c++/116223 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | |
| 4 | template <int T> struct A { int value = T; }; |
| 5 | |
| 6 | template <unsigned char X> using B = A<X>; |
| 7 | |
| 8 | template <auto X> |
| 9 | void foo(B<X>& mat) noexcept |
| 10 | { |
| 11 | // std::cout << mat.value << "\n"; |
| 12 | } |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | A<2> mat; |
| 17 | foo(mat); |
| 18 | } |