[Bug c++/14790] C++: ambigous overload compile failure - new case different from 1675
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Mar 31 10:49:00 GMT 2004
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-03-31 10:49 -------
The code is invalid: [10.2]/2 states
The following steps define the result of name lookup in a class scope,
C. First, every declaration for the name in the class and in each of
its base class sub-objects is considered. [...] If the resulting set of
declarations are not all from sub-objects of the same type, or the set
has a nonstatic member and includes members from distinct sub-objects,
there is an ambiguity and the program is ill-formed. Otherwise that set
is the result of the lookup.
Because the name appears in two base classes, the testcase is invalid.
(The fact that the functions in the testcase have different signatures
doesn't matter at all for name resolution!)
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14790
More information about the Gcc-bugs
mailing list