Created on 1999-03-17.00:00:00 last changed 172 months ago
Rationale:
Needed for consistency with the way locales are handled elsewhere in the standard.
Proposed resolution:
Remove the phrase "(or, failing that, in the global locale)" from section 22.1.1.
Section [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
[locale.global.templates]:
template <class Facet> const Facet& use_facet(const
locale& loc);
-1- Get a reference to a facet of a locale.
-2- Returns: a reference to the corresponding facet of loc, if present.
-3- Throws: bad_cast if has_facet<Facet>(loc) is false.
-4- Notes: The reference returned remains valid at least as long as any copy of loc exists
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg1654 |
2010-10-21 18:28:33 | admin | set | messages: + msg1653 |
1999-03-17 00:00:00 | admin | create |