Skip to content

<locale>: locale's copy assignment has incorrect return type #268

@CaseyCarter

Description

@CaseyCarter

Per [locale], std::locale's copy assignment std::locale::operator=(const locale&) should return a constant lvalue that denotes *this. We incorrectly return a non-const lvalue:

locale& operator=(const locale& _Right) noexcept {

Command-line test case
https://godbolt.org/z/bkFbL-

Metadata

Metadata

Assignees

No one assigned

    Labels

    LWG issue neededA wording defect that should be submitted to LWG as a new issuebugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions