cplusplus / cplusplus/draft

[expr.prim.lambda.capture]/12 Lengthy but redundant wording

Open Beginner friendly
#9,292 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

[expr.prim.lambda.capture]/12 says

An entity is captured by reference if it is implicitly or explicitly captured but not captured by copy.

However, [expr.prim.lambda.capture]/8 says

An entity is captured if it is captured explicitly or implicitly.

So it's enough to say

An entity is captured by reference if it is implicitly or explicitly captured but not captured by copy.

Similarly [expr.prim.lambda.capture]/17

[Note 10: If a non-reference entity is implicitly or explicitly captured by reference, invoking the function call operator of the corresponding lambda-expression after the lifetime of the entity has ended is likely to result in undefined behavior. — end note]

Or is it intentional to use a verbose tone to remind readers?

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

Review [expr.prim.lambda.capture] paragraphs 8, 12, and 17 in the draft source, comparing the repeated wording with the definition of “captured.” Remove the redundant “implicitly or explicitly” phrasing where appropriate, and confirm the resulting text preserves the intended meaning in both the normative statement and the note.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.