Skip to content

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

@eisenwave

Description

@eisenwave

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-BugPresentational errors and omissions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions