cplusplus / cplusplus/draft

[std] Some uses of "Equivalent to `expression`" violate specification style

Open
#8,506 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The style guidelines say

For "Equivalent to", a plain expression should appear only if it is of type void; for value-returning functions, use return expression; (see below).

However, this rule is followed very inconsistently. For example, https://eel.is/c++draft/istream.assign#1 uses an equivalent to swap(rhs) in operator=, without return. If you want a more recent example, see yield_value in https://eel.is/c++draft/coro.generator.promise#4

I haven't checked every use to figure out how much is broken, but it doesn't look too bad overall.

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 with the referenced style guideline and compare the operator= and yield_value clauses linked in the issue. Search the draft for other uses of "Equivalent to" and check each against whether it returns a value. Done means the inconsistent wording is identified and corrected throughout the affected specification text.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.