cplusplus / cplusplus/draft

[basic.def.odr#9] Saying that a scope corresponds to a function is not precise

Open
#4,770 1 comment 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

[basic.def.odr#9]

A local entity is odr-usable in a scope if:

  • either the local entity is not *this, or an enclosing class or non-lambda function parameter scope exists and, if the innermost such scope is a function parameter scope, it corresponds to a non-static member function, and

Since the wording "correspond" has been used to expound the relationship between one declaration and another declaration. Moreover, expounding the relationship between a declaration and a relevant scope, we use the "introduce", which is shown as the following:

every other scope S is introduced by a declaration, parameter-declaration-clause, statement, or handler (as described in the following subclauses of [basic.scope]) appearing in another scope which thereby contains S.

Hence, I think that change "it corresponds to a non-static member function" to that

it is introduced by a non-static member function

or

it is introduced by the parameter-declaration-clause of a non-static member function

is more precise and consistent.

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

Locate [basic.def.odr#9] in the C++ draft and read the surrounding wording on local entities, scopes, and function parameter scopes. Compare the use of “corresponds” with the draft’s use of “introduced by,” then update the sentence if the proposed terminology is consistent with those definitions. Done means the relationship is expressed precisely and consistently.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.