annotate gcc/testsuite/g++.dg/template/using18.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // PR c++/23211
kono
parents:
diff changeset
2 // { dg-do compile }
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 template<class T>
kono
parents:
diff changeset
5 struct foo
kono
parents:
diff changeset
6 {
kono
parents:
diff changeset
7 typedef int jtype;
kono
parents:
diff changeset
8 struct bar
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 using typename foo<T>::jtype; // { dg-error "not a base type" }
kono
parents:
diff changeset
11 using foo<T>::jtype; // { dg-error "not a base type" }
kono
parents:
diff changeset
12 };
kono
parents:
diff changeset
13 };
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 template <class T>
kono
parents:
diff changeset
16 struct A : T
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 using T::i;
kono
parents:
diff changeset
19 using typename T::type;
kono
parents:
diff changeset
20 };
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 struct B1 {};
kono
parents:
diff changeset
23 template <class T> struct B2 {};
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 template <class T>
kono
parents:
diff changeset
26 struct C : B1, B2<T>
kono
parents:
diff changeset
27 {
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
28 using B1::x; // { dg-error "has not been declared" }
111
kono
parents:
diff changeset
29 using B2<T>::y;
kono
parents:
diff changeset
30 using typename B2<T>::type;
kono
parents:
diff changeset
31 };