C++ Logo

std-proposals

Advanced search

Re: [std-proposals] explicit this

From: Gašper Ažman <gasper.azman_at_[hidden]>
Date: Mon, 3 Apr 2023 12:43:32 +0100
How about "just use an explicit-object function" and then bodies behave
like they do in free functions?

This is basically what Ville told you to do, as well.

On Mon, Apr 3, 2023 at 12:41 PM Bo Persson via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> 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.
>
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2023-04-03 11:43:44