The following code reports that neither class X nor Y contain nexted class T:
#include <iostream> #include <vector> struct X { typedef int T; }; class Y{ }; template<typename Z> void foo(Z const& z, typename Z::T* p) { std::cout << "has Z::T" << std::endl; } template<typename Z> void foo(Z const& z, ...) { std::cout << "hasn't Z::T" << std::endl; } int main(int argc, char *argv[]) { foo( X(), 0 ); foo( Y(), 0 ); } My understanding is that the ellipsis should always have lower precedence. Thank you. You all do wonderful work! -- Summary: overload/SFINAE problem Product: gcc Version: 4.0.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: m_albert137 at yahoo dot com GCC host triplet: powerpc-ibm-aix4.3.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29577