Debian Codegraph @

gcc/testsuite/g++.dg/template/typename24.C

raw
1 // PR c++/107773
2 // Verify lookup for a non-neste TYPENAME_TYPE correctly considers
3 // non-types.
4
5 struct a {
6 typedef void get;
7 };
8
9 struct b : a {
10 int get(int i) const;
11 };
12
13 template<class T>
14 void f() {
15 typedef typename T::get type; // { dg-error "'int b::get\\(int\\) const', which is not a type" }
16 }
17
18 template void f<b>();