// The code has been tested with GCC 3.4.2, 4.1.1 and 4.2.0 (alpha) and fails. // It compiles successfully with Comeau (>= 4.2) and VisualC++ (>=7.1).
template<typename X> struct x { template<typename Y> struct y { typedef Y type; }; }; template<typename A> struct a : x<A> { // supposed to fail (unqualified lookup does not look into dependent base) // [ 14.6.2-3 ] // // template<typename B> // typename y<B>::type f(B); // // qualified lookup should find inherited class template 'y', however template<typename B> typename a::template y<B>::type f(B); }; -- Summary: Qualified lookup fails to find inherited class template Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tschwinger at neoscientists dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27787