Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dcl.friend] Specify where a friend specifier can appear #5548

Open
xmh0511 opened this issue Jul 4, 2022 · 0 comments
Open

[dcl.friend] Specify where a friend specifier can appear #5548

xmh0511 opened this issue Jul 4, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jul 4, 2022

In the current standard, the specification regarding the friend specifier is too brief.

The friend specifier is used to specify access to class members; see [class.friend].

Unlike other specifiers, which are specified where they can appear. For example

The mutable specifier shall appear only in the declaration of a non-static data member ([class.mem]) whose type is neither const-qualified nor a reference type.

The virtual specifier shall be used only in the initial declaration of a non-static member function; see [class.virtual].

[class.friend] says nothing about this part. In order to make it clear where a friend specifier can appear, [dcl.friend] might be changed to

The friend specifier shall appear only in a member-declaration. It is used to specify access to class members; see [class.friend].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant