This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/34449] use_facet<xxx_byname>(locale::classic()) returns true
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2007 18:56:41 -0000
- Subject: [Bug libstdc++/34449] use_facet<xxx_byname>(locale::classic()) returns true
- References: <bug-34449-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bkoz at gcc dot gnu dot org 2007-12-14 18:56 -------
The only thing that I have issue with is this part:
assert (check_use_facet<std::ctype_byname<char> >(named));
There is no verbiage in the standard that specifies that named locales use the
_byname facets. This is implied in the test case given.
I'm looking in N2461 at 22.1.1.2, where the const char* locale constructors
were added. There is no specification of byname facets.
>From 22.1.1.1.2
For some standard facets a standard ?. . ._byname? class, derived from it,
implements the virtual function semantics equivalent to that facet of the
locale constructed by locale(const char*) with the same name.
This doesn't actually require what this code asserts.
;)
-benjamin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34449