Re: [std-proposals] Idea: "friend" scope

1,239 views
Skip to first unread message

Thiago Macieira

unread,
Jun 21, 2019, 12:35:03 AM6/21/19
to std-pr...@isocpp.org
On Thursday, 20 June 2019 14:41:33 PDT Matthew Woehlke via Std-Proposals
wrote:
> static std::shared_ptr<a> create(int x)
> {
> friend
> {
> // Within this block, all access protection to `a` is suspended.
> ...
> }
> }

Sorry, please clarify: is this a free function? Or is it a member of a?

If it is a member of a, then everything in there already has access to a.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel System Software Products



Reply all
Reply to author
Forward
0 new messages