gcc/testsuite/g++.dg/cpp2a/typename14.C
raw| 1 | // PR c++/88325 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template<typename> struct A |
| 5 | { |
| 6 | template<typename> A (); |
| 7 | }; |
| 8 | |
| 9 | template<typename T> |
| 10 | template<typename U> |
| 11 | A<T>::A<U> () // { dg-error "" } |
| 12 | { |
| 13 | } |
| 14 | |
| 15 | template<typename> struct B |
| 16 | { |
| 17 | template<typename> int foo (int); |
| 18 | }; |
| 19 | |
| 20 | template<typename T> |
| 21 | template<typename U> |
| 22 | B<T>::foo<int>(int) // { dg-error "" } |
| 23 | { |
| 24 | return 1; |
| 25 | } |