This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
Section: 30.3.1 [locale] Status: New Submitter: Stephan T. Lavavej Opened: 2019-12-06 Last modified: 2019-12-21
View all other issues in [locale].
View all issues with New status.
Curiously, locale's copy assignment operator currently returns const locale&. As Casey Carter noted in microsoft/STL#268, this is:
The only occurrence in the entire Standard Library.
Preventing locale from satisfying std::copyable.
We aren't aware of any reason for this to be const. (I observe that this hasn't changed since N1804 on 2005-04-27 and probably goes back to C++98; I suspect that when this was originally specified, copy assignment operators were relatively new, and conventions for them weren't rigorously followed.)
[2019-12-21 Issue Prioritization]
Priority to 3 after reflector discussion based on the observation that we have implementation divergence.
This wording is relative to N4842.
Modify 30.3.1 [locale] as indicated:
[…] ~locale(); // not virtual
constlocale& operator=(const locale& other) noexcept; template<class Facet> locale combine(const locale& other) const; […]
Modify 18.104.22.168 [locale.cons] as indicated:
constlocale& operator=(const locale& other) noexcept;
-14- Effects: Creates a copy of other, replacing the current value.-15- Returns: *this.