Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/typename10.C

raw
1 // P0634R3
2 // { dg-do compile { target c++20 } }
3
4 namespace N {
5 // template<typename T> extern T::type v; // #1a
6 template<typename T> T::type v(typename T::value); // #1b
7 }
8 template<typename T> T::type N::v(T::value); // #2
9
10 namespace N2 {
11 template<typename T> extern T::type v; // #1a
12 //template<typename T> T::type v(typename T::value); // #1b
13 }
14 template<typename T> T::type N2::v(T::value);
15
16 namespace A {
17 inline namespace B { template<typename T> int f(typename T::foo); }
18 inline namespace C { template<typename T> extern int f; }
19 }
20 template<typename T> int A::f(T::foo); // { dg-error "ambiguous" }