gcc/testsuite/g++.dg/cpp2a/typename12.C
raw| 1 | // P0634R3 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct W { |
| 5 | template<typename T> |
| 6 | static int fn1 (T::X); |
| 7 | template<typename T> |
| 8 | static int fn2 (T::X); |
| 9 | template<typename T> |
| 10 | static int fn2 (T::X, int); |
| 11 | }; |
| 12 | |
| 13 | template<typename T> |
| 14 | int W::fn1 (T::X p) { return p; } |
| 15 | |
| 16 | template<typename T> |
| 17 | int W::fn2 (T::X p) { return p; } |
| 18 | |
| 19 | template<typename T> |
| 20 | int fn2 (typename T::X p) { return p; } |