gcc/testsuite/g++.dg/template/pr71406.C
raw| 1 | // { dg-do compile } |
| 2 | // PR c++/71406 ICE with X::template Name |
| 3 | |
| 4 | template < typename T > |
| 5 | struct C : T |
| 6 | { |
| 7 | void foo () { this->C::template bar <>; } |
| 8 | }; |
| 9 | |
| 10 | template < typename T > |
| 11 | struct A |
| 12 | { |
| 13 | template < void (T::*Fn) () > void f () {} |
| 14 | }; |
| 15 | |
| 16 | template < typename T > struct B : A < B < T > > |
| 17 | { |
| 18 | void g () |
| 19 | { |
| 20 | this->B::template f < &B < T >::g > (); |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | void Foo () |
| 25 | { |
| 26 | B < int > b; |
| 27 | b.g (); |
| 28 | } |