This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13590] unexpected overload resolution
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jan 2004 14:01:01 -0000
- Subject: [Bug c++/13590] unexpected overload resolution
- References: <20040106205426.13590.boris@kolpackov.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-01-07 14:00 -------
There is no ambiguity in the call to f(int), because there is only
one such function. That there might be an ambiguity for other argument
types is irrelevant.
There is also no ambiguity in my shortened example (and your original
code): the base class is virtual, so there is exactly one copy and
no ambiguity with what "this" pointer it has to be called. That doesn't
mean, however, that a compiler is supposed to detect this special case
of virtual base classes, though.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13590