gcc/testsuite/g++.dg/cpp1z/nontype-auto23.C
raw| 1 | // PR c++/99186 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | |
| 4 | template<int N, class T, class... U> |
| 5 | struct tuple_impl : tuple_impl<N + 1, U...> { }; |
| 6 | |
| 7 | template<int N, class T> |
| 8 | struct tuple_impl<N, T> { }; |
| 9 | |
| 10 | template<class T, class U> |
| 11 | struct tuple : tuple_impl<0, T, U> { }; |
| 12 | |
| 13 | template<class T, int N, class... U> |
| 14 | void get(const tuple_impl<N, T, U...>&); |
| 15 | |
| 16 | template<auto> struct S; |
| 17 | |
| 18 | int main() { |
| 19 | tuple<S<1>,S<1U>> x; |
| 20 | get<S<1U>>(x); |
| 21 | get<S<1>>(x); |
| 22 | } |