https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64649
--- Comment #5 from Tim Shen <timshen at gcc dot gnu.org> --- Author: timshen Date: Tue Feb 3 08:59:24 2015 New Revision: 220365 URL: https://gcc.gnu.org/viewcvs?rev=220365&root=gcc&view=rev Log: PR libstdc++/64649 Backported from mainline 2015-01-22 Tim Shen <tims...@google.com> * include/bits/regex.tcc (regex_traits<>::lookup_collatename, regex_traits<>::lookup_classname): Correctly narrow input chars. * testsuite/28_regex/traits/wchar_t/user_defined.cc: New testcase. Modified: branches/gcc-4_9-branch/libstdc++-v3/ChangeLog branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex.tcc branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/traits/wchar_t/user_defined.cc