C++ Logo

std-proposals

Advanced search

Re: [std-proposals] explicit this

From: Bo Persson <bo_at_[hidden]>
Date: Mon, 3 Apr 2023 13:41:12 +0200
On 2023-04-03 at 12:40, Frederick Virchanza Gotham via Std-Proposals wrote:
> On Mon, Apr 3, 2023 at 11:20 AM Ville Voutilainen
> <ville.voutilainen_at_[hidden]> wrote:
>>
>> Looks like you're failing to see the point. When you write it
>> correctly, that is,
>>
>> return ::Monkey::Func();
>>
>> you know that's a non-member function because it has a :: in the very
>> beginning, so it can't
>> be a member function of the current class or of a base class.
>
>
> I understood the point. The counter-point I was making was that you
> sometimes needed to prepend something more complicated than "::".
>

So the solution to "sometimes needed to prepend something more
complicated" is to *always* prepend this-> to everything else.

Doesn't seem like a simplification to me.

Received on 2023-04-03 11:41:18