This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/29577] New: overload/SFINAE problem
- From: "m_albert137 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2006 00:48:59 -0000
- Subject: [Bug c++/29577] New: overload/SFINAE problem
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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