gcc/testsuite/g++.dg/template/typename10.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | // Copyright (C) 2006 Free Software Foundation, Inc. |
| 4 | // Contributed by Nathan Sidwell 25 Aug 2006 <[email protected]> |
| 5 | |
| 6 | // Origin: Tobias Schwinger <[email protected]> |
| 7 | // PR 27787. Too eager to resolve a typename |
| 8 | |
| 9 | template<typename X> |
| 10 | struct x |
| 11 | { |
| 12 | template<typename Y> |
| 13 | struct y |
| 14 | { |
| 15 | typedef Y type; |
| 16 | }; |
| 17 | }; |
| 18 | |
| 19 | template<typename A> |
| 20 | struct a : x<A> |
| 21 | { |
| 22 | template<typename B> |
| 23 | typename a::template y<B>::type f(B); |
| 24 | }; |