C++ Logo

std-proposals

Advanced search

Re: This deduction and access control

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sun, 19 Jul 2020 09:47:39 -0400
On Sun, Jul 19, 2020 at 7:43 AM Magnus Fromreide via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On Sun, Jul 19, 2020 at 07:02:22AM +0100, Gašper Ažman wrote:
> > You are correct, it does not. You will have to mark the method as a friend
> > in derived.
>
> Ok, so under this proposal a using-declaration of a method from a parent
> ain't enough to grant the use of it from a child.
>
> I also noticed that this is very close to Universal Functions (N4165),
> but slightly limited (can only be declared as members).

No, it's not. It's nothing like that proposal. Just look at the
proposal's abstract, and you'll see that what it provides has nothing
to do with P0847. That proposal is about allowing you to use member
call syntax to call non-member functions. This proposal has nothing to
do with function calls themselves.

This proposal is about how you *write* a member function, not how you call one.

Received on 2020-07-19 08:51:08