This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7403: An ambiguity error is flagged during cast with proper perfect single match.
- From: jdennett at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, hkb at eastcoastpaperstock dot com, nobody at gcc dot gnu dot org
- Date: 8 Nov 2002 18:54:48 -0000
- Subject: Re: c++/7403: An ambiguity error is flagged during cast with proper perfect single match.
- Reply-to: jdennett at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, hkb at eastcoastpaperstock dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: An ambiguity error is flagged during cast with proper perfect single match.
State-Changed-From-To: open->closed
State-Changed-By: jdennett
State-Changed-When: Fri Nov 8 10:54:46 2002
State-Changed-Why:
This is not a bug. B::operator A() is not a perfect match,
because of the const-qualification. If the B object in the example code is declared const, the code is legal and g++
compiles it correctly.
como also diagnoses the error in the example code, with similar wording to g++.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7403