Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/template/lookup12.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 // PR c++/94799 - member template function lookup fails. | |
2 | |
3 template<typename T> struct B { | |
4 void foo (); | |
5 int i; | |
6 }; | |
7 | |
8 template<typename T> | |
9 struct D : public B<T> { }; | |
10 | |
11 template<typename T> | |
12 void fn (D<T> d) | |
13 { | |
14 d.template B<T>::foo (); | |
15 d.template B<T>::i = 42; | |
16 D<T>().template B<T>::foo (); | |
17 d.template D<T>::template B<T>::foo (); | |
18 d.template D<T>::template B<T>::i = 10; | |
19 } | |
20 | |
21 int | |
22 main () | |
23 { | |
24 D<int> d; | |
25 fn(d); | |
26 } |