]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/cpp2a/typename10.C
PR c++/88757 - qualified name treated wrongly as type.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp2a / typename10.C
CommitLineData
e98322ca 1// P0634R3
2// { dg-do compile { target c++2a } }
3
4namespace N {
5 // template<typename T> extern T::type v; // #1a
6 template<typename T> T::type v(typename T::value); // #1b
7}
8template<typename T> T::type N::v(T::value); // #2
9
10namespace N2 {
11 template<typename T> extern T::type v; // #1a
12 //template<typename T> T::type v(typename T::value); // #1b
13}
dffbcba8 14template<typename T> T::type N2::v(T::value);
e98322ca 15
16namespace A {
17 inline namespace B { template<typename T> int f(typename T::foo); }
18 inline namespace C { template<typename T> extern int f; }
19}
20template<typename T> int A::f(T::foo); // { dg-error "ambiguous" }