stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <>
Subject Re: [PATCH] STDCXX-1073
Date Sun, 28 Oct 2012 22:31:18 GMT
On 10/25/12 11:31, Martin Sebor wrote:
> There are comments suggesting that calling do_transform()
> on the whole string may be suboptimal. Intuitively it makes
> sense that calling wcscoll() (in a loop, on the NUL-terminated
> substrings, if necessary) should be faster than simply calling
> do_transform() followed by wstring::compare(), but it would
> make sense to confirm the hypothesis before implementing the
> optimization.

Alright, same files, two more patches.

2012-10-28  Liviu Nicoara  <>

     Fixes to collate facet and test enhancements:

     * src/collate.cpp (__rw_strnxfrm): corrected processing of
       embedded NULs. (__rw_wcsnxfrm) same (duplicated code).
       (collate_byname<wchar_t>::do_compare): fixed string comparison
       return values, re-implemented the wcscoll-based comparison.
     * tests/localization/22.locale.collate.cpp: implemented a simpler
       collation test for strings with embedded NULs.

All existing and new collate tests pass, but I think some more test enhancements are required.


View raw message