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-
Per [locale],
std::locale's copy assignmentstd::locale::operator=(const locale&)should return a constant lvalue that denotes*this. We incorrectly return a non-constlvalue:STL/stl/inc/xlocale
Line 357 in 9d635aa
Command-line test case
https://godbolt.org/z/bkFbL-