[Patch/RFA] Further speedup locale::operator==

Martin Sebor sebor@roguewave.com
Thu Apr 29 17:03:00 GMT 2004


Paolo Carlini wrote:
> Martin Sebor wrote:
> 
>> PS Consider the program below (which runs successfully with
>> our latest implementation):
> 
> 
> Before further discussing your interesting reply: have you actually
> tested this with libstdc++-v3? It works for me with 3.3.3, 3.4.0 and
> mainline! I passed: "de_DE fr_FR", "fr_FR fr_FR", "".

If invoked like this: ./a.out de_DE fr_FR the program should
abort on line 15. According to 22.1.1.3, the locale returned
from locale::combine() has no name.

> 
> Does this mean we (both v3 and RW) are not implementing the letter
> of the current standard (for good ;) ?

We don't -- intentionally in this case(*) :)

(*) Actually, in the program I think the facet should not
be ctype (there are two other facets in the ctype category:
codecvt<char> and codecvt<wchar_t>). collate would have been
a better choice, as would have been messages.

Martin



More information about the Libstdc++ mailing list