[Bug c++/92849] call to 'operator()' incorrectly considered ambiguous, when inherited twice with different type parameters
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 6 21:03:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92849
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If name lookup finds the name in multiple base classes, the lookup is
ambiguous. Overload resolution is not done to determine if one function is a
better match than the other.
By pulling them all into the derived class with a using-declaration it means
name lookup finds them all in the same scope, and then applies overload
resolution to find the best one.
So I think GCC is correct.
More information about the Gcc-bugs
mailing list