Skip to content

explain of "std::atomic<T>::operator++" is wrong. #141

Open

Description

@leonleeann

explain of std::atomic::operator++ is wrong.

The original text in "Return value" section:

Return value
operator++() and operator--() return the value of the atomic variable after the modification. Formally, the result of incrementing/decrementing the value immediately preceding the effects of this function in the modification order of *this.

operator++(int) and operator--(int) return the value of the atomic variable before the modification. Formally, the value immediately preceding the effects of this function in the modification order of *this.

should be:
operator++() and operator--() return the value of the atomic variable after the modification. Formally, the result of incrementing/decrementing the value immediately succeeding the effects of this function in the modification order of *this.

Activity

  1. nexushoratio commented on Jan 1, 2026

    @nexushoratio

    FYI: This repo is about the tools that export the wiki site as a single archive.

    It has nothing to do with the content of the wiki.

    But, being a wiki, you can go in and modify it yourself (well, once it unfreezes due to current maintenance).

  2. cubbimew commented on Apr 19, 2026

    @cubbimew
    Contributor

    "preceding" is correct IMO (note the first one is preceding plus 1, second one just preceding)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions