1 // { dg-do compile } 2 3 // Copyright (C) 2006 Free Software Foundation, Inc. 4 // Contributed by Nathan Sidwell 25 Aug 2006 <nathan@codesourcery.com> 5 6 // Origin: Tobias Schwinger <tschwinger@neoscientists.org> 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 }; 25