llvm-project/libcxx/src
Eric Fiselier 0d542d350d [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname and numpunct_byname.
Summary:
The underlying C locales provide the `thousands_sep` and `decimal_point` as strings, possible with more than one character. We currently don't handle this case even for `wchar_t`.

This patch properly converts the mbs -> wide character for `moneypunct_byname<wchar_t>`. For the `moneypunct_byname<char>` case we attempt to narrow the WC and if that fails we also attempt to translate it to some reasonable value. For example we translate U00A0 (non-breaking space) into U0020 (regular space). If none of these conversions succeed then we simply allow the base class to provide a fallback value.


Reviewers: mclow.lists, EricWF

Subscribers: vangyzen, george.burgess.iv, cfe-commits

Differential Revision: https://reviews.llvm.org/D24218

llvm-svn: 289347
2016-12-11 00:20:59 +00:00
..
experimental Make variant's index part of the hash value 2016-12-02 23:38:31 +00:00
include [libcxx] Add support for Fuchsia 2016-10-10 18:53:32 +00:00
support [solaris] Convert the support library to C++ to fix -std=c++11 build 2016-10-18 16:54:59 +00:00
algorithm.cpp Mark libc++ internal globals with _LIBCPP_SAFE_STATIC. 2016-09-28 22:08:13 +00:00
any.cpp [libcxx] Add std::any 2016-08-11 03:13:11 +00:00
bind.cpp Implement LWG 2488 - Make the placeholders constexpr. 2016-06-26 21:01:34 +00:00
chrono.cpp [libc++] Remove unneeded visibility pragmas 2016-11-23 16:11:15 +00:00
condition_variable.cpp Fix PR30202 - notify_all_at_thread_exit seg faults if run from a raw pthread context. 2016-09-03 08:07:40 +00:00
debug.cpp Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
exception.cpp Mark libc++ internal globals with _LIBCPP_SAFE_STATIC. 2016-09-28 22:08:13 +00:00
future.cpp Make it possible to build a no-exceptions variant of libcxx. 2015-11-10 11:41:22 +00:00
hash.cpp Fix typos 2014-05-15 11:27:39 +00:00
ios.cpp [libc++] Fix extern template visibility for Windows 2016-09-19 18:29:07 +00:00
iostream.cpp Make the presence of stdin and stdout optional. 2015-03-26 14:35:46 +00:00
locale.cpp [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname and numpunct_byname. 2016-12-11 00:20:59 +00:00
memory.cpp Mark libc++ internal globals with _LIBCPP_SAFE_STATIC. 2016-09-28 22:08:13 +00:00
mutex.cpp Mark libc++ internal globals with _LIBCPP_SAFE_STATIC. 2016-09-28 22:08:13 +00:00
new.cpp Allow using libsupc++ with LIBCXX_ENABLE_STATIC_ABI_LIBRARY. Patch from Michael Daniels. 2016-11-18 22:25:41 +00:00
optional.cpp Implement N4606 optional 2016-10-12 07:46:20 +00:00
random.cpp Add support for arc4random() to random_device. 2015-03-10 07:46:06 +00:00
regex.cpp [libcxx] Remove pragmas that were needed to suppress warnings produced 2016-01-28 06:13:36 +00:00
shared_mutex.cpp Implement N4508: shared_mutex. Reviewed as http://reviews.llvm.org/D10480 2015-06-30 14:04:14 +00:00
stdexcept.cpp [libc++] Fix modules build - Rework __refstring definition 2016-10-25 19:33:14 +00:00
string.cpp Revert r284193 - it is not correct on OS X 2016-10-14 04:21:24 +00:00
strstream.cpp Fix or suppress GCC warnings during build. 2016-08-29 20:43:38 +00:00
system_error.cpp Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
thread.cpp Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
typeinfo.cpp Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. 2016-08-25 15:09:01 +00:00
utility.cpp
valarray.cpp Revert "Turn off extern templates for most uses." 2014-08-15 17:58:56 +00:00
variant.cpp Implement C++17 <variant>. Patch from Michael Park! 2016-12-02 23:00:05 +00:00