C++ Logo

std-proposals

Advanced search

Re: This deduction and access control

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sun, 19 Jul 2020 17:40:21 +0300
On Sun, 19 Jul 2020 at 14:43, 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.

In your example, the member function of the parent can be used just
fine from the child,
but that member function of the parent cannot access the private base
of the child.

Received on 2020-07-19 09:43:49