111
|
1 // PR c++/23211
|
|
2 // { dg-do compile }
|
|
3
|
|
4 template<class T>
|
|
5 struct foo
|
|
6 {
|
|
7 typedef int jtype;
|
|
8 struct bar
|
|
9 {
|
|
10 using typename foo<T>::jtype; // { dg-error "not a base type" }
|
|
11 using foo<T>::jtype; // { dg-error "not a base type" }
|
|
12 };
|
|
13 };
|
|
14
|
|
15 template <class T>
|
|
16 struct A : T
|
|
17 {
|
|
18 using T::i;
|
|
19 using typename T::type;
|
|
20 };
|
|
21
|
|
22 struct B1 {};
|
|
23 template <class T> struct B2 {};
|
|
24
|
|
25 template <class T>
|
|
26 struct C : B1, B2<T>
|
|
27 {
|
145
|
28 using B1::x; // { dg-error "has not been declared" }
|
111
|
29 using B2<T>::y;
|
|
30 using typename B2<T>::type;
|
|
31 };
|