cplusplus / cplusplus/draft

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

Open
#5,548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

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].

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the [dcl.friend] section and compare its wording with the cited [class.mem] and [class.virtual] specifier rules. Check that the section explicitly states where the friend specifier can appear and preserves its existing purpose; the issue is done when the standard text resolves that omission.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.