C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Ambiguous function overload resolution for multiple inheritance
From: Peter Neiß (me_at_[hidden])
Date: 2019-09-23 14:00:32


On Mon, 23 Sep 2019 20:26:15 +0200, Christof Meerwald via Std-Proposals
<std-proposals_at_[hidden]> wrote:

> On Mon, Sep 23, 2019 at 07:16:43PM +0200, Peter Neiß via Std-Proposals
> wrote:
> [...]
>> I like to propose the following to make overload resolution more
>> precise.
>> The following code shows my problem: (testet with gcc, clang, msvc)
> [...]
>> ab.f(p); // is ambiguous
>
> But it's name lookup that's ambiguous here, so you don't even get to
> overload resolution, see http://eel.is/c++draft/class.member.lookup
>
>
> Christof
>

Thank you Christof for your reply. My language lawyering is weak, as is my
proposed solution. I could image that if the function name is not
redefined in the derived class, name lookup should work as if the using
declarations where explicitly stated, but i wish to not have to write
them. It should not break code that works now. It would only behave
differently for code that does not compile today.

Peter


STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups