C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Real World Programming, private = public

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sat, 2 Sep 2023 11:15:31 -0400
On Sat, Sep 2, 2023 at 10:27 AM Andrey Semashev via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> On 9/2/23 16:45, Frederick Virchanza Gotham via Std-Proposals wrote:
> > On Sat, Sep 2, 2023 at 5:42 AM Sebastian Wittmeier wrote:
> >>
> >> Use a friend function.
> >
> > You'd have to edit the header file to do that. The idea is not to have
> > to edit the header file.
>
> Defining a macro that affects the header is equivalent to editing the
> header.

... yes. That's what this "proposal" is all about: creating a way in
the language to have the desired effect (bypassing access controls)
but without that consequence.

Received on 2023-09-02 15:15:43