This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.
137. Do use_facet and has_facet look in the global locale?Section: 28.3.3.1 [locale] Status: TC1 Submitter: Angelika Langer Opened: 1999-03-17 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [locale].
View all issues with TC1 status.
Discussion:
Section 28.3.3.1 [locale] says:
-4- In the call to use_facet<Facet>(loc), the type argument chooses a facet, making available all members of the named type. If Facet is not present in a locale (or, failing that, in the global locale), it throws the standard exception bad_cast. A C++ program can check if a locale implements a particular facet with the template function has_facet<Facet>().
This contradicts the specification given in section 28.3.3.2 [locale.global.templates]:
template <class Facet> const Facet& use_facet(const locale& loc);
-1- Get a reference to a facet of a locale.
Proposed resolution:
Remove the phrase "(or, failing that, in the global locale)" from section 22.1.1.
Rationale:
Needed for consistency with the way locales are handled elsewhere in the standard.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4