This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofCD1 status.
Section: 28.3.3.1.2.2[locale.facet]Status:CD1Submitter: Martin SeborOpened: 2003-10-15Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [locale.facet].
View all issues withCD1 status.
Discussion:
Is "const std::ctype<char>" a valid template argument to has_facet, use_facet,and the locale template ctor? And if so, does it designate the same Facet asthe non-const "std::ctype<char>?" What about "volatile std::ctype<char>?"Different implementations behave differently: some fail to compile, othersaccept such types but behave inconsistently.
Proposed resolution:
Change 22.1.1.1.2, p1 to read:
Template parameters in this clause which are required to be facetsare those named Facet in declarations. A program that passes a typethat is not a facet, or a type that refers to volatile-qualifiedfacet, as an (explicit or deduced) template parameter to a localefunction expecting a facet, is ill-formed. A const-qualified facet isa valid template argument to any locale function that expects a Facettemplate parameter.
[Kona: changed the last sentence from a footnote to normativetext.]