This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofTC1 status.
Section: 28.3.3.1.4[locale.members]Status:TC1Submitter: Nathan MyersOpened: 1998-08-06Last modified: 2016-08-09
Priority:Not Prioritized
View all otherissues in [locale.members].
View all issues withTC1 status.
Discussion:
locale::combine is the only member function of locale (other than constructors anddestructor) that is not const. There is no reason for it not to be const, and good reasonswhy it should have been const. Furthermore, leaving it non-const conflicts with 22.1.1paragraph 6: "An instance of a locale is immutable."
History: this member function originally was a constructor. it happened that theinterface it specified had no corresponding language syntax, so it was changed to a memberfunction. As constructors are never const, there was no "const" in the interfacewhich was transformed into member "combine". It should have been added at thattime, but the omission was not noticed.
Proposed resolution:
In 28.3.3.1[locale] and also in 28.3.3.1.4[locale.members], add "const" to the declaration of member combine:
template <class Facet> locale combine(const locale& other) const;