diff options
Diffstat (limited to 'lib/libcxx/src/locale.cpp')
-rw-r--r-- | lib/libcxx/src/locale.cpp | 386 |
1 files changed, 215 insertions, 171 deletions
diff --git a/lib/libcxx/src/locale.cpp b/lib/libcxx/src/locale.cpp index da2fd11678d..a6cb0e97d12 100644 --- a/lib/libcxx/src/locale.cpp +++ b/lib/libcxx/src/locale.cpp @@ -24,15 +24,20 @@ #endif #include "clocale" #include "cstring" +#if defined(_LIBCPP_MSVCRT) +#define _CTYPE_DISABLE_MACROS +#endif #include "cwctype" #include "__sso_allocator" #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) #include "support/win32/locale_win32.h" -#elif !defined(__ANDROID__) +#elif !defined(__BIONIC__) #include <langinfo.h> #endif #include <stdlib.h> #include <stdio.h> +#include "include/atomic_support.h" +#include "__undef_macros" // On Linux, wint_t and wchar_t have different signed-ness, and this causes // lots of noise in the build log, but no bugs that I know of. @@ -42,6 +47,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD +struct __libcpp_unique_locale { + __libcpp_unique_locale(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) {} + + ~__libcpp_unique_locale() { + if (__loc_) + freelocale(__loc_); + } + + explicit operator bool() const { return __loc_; } + + locale_t& get() { return __loc_; } + + locale_t __loc_; +private: + __libcpp_unique_locale(__libcpp_unique_locale const&); + __libcpp_unique_locale& operator=(__libcpp_unique_locale const&); +}; + #ifdef __cloc_defined locale_t __cloc() { // In theory this could create a race condition. In practice @@ -65,8 +88,8 @@ T& make(A0 a0) { static typename aligned_storage<sizeof(T)>::type buf; - ::new (&buf) T(a0); - return *reinterpret_cast<T*>(&buf); + auto *obj = ::new (&buf) T(a0); + return *obj; } template <class T, class A0, class A1> @@ -85,8 +108,8 @@ T& make(A0 a0, A1 a1, A2 a2) { static typename aligned_storage<sizeof(T)>::type buf; - ::new (&buf) T(a0, a1, a2); - return *reinterpret_cast<T*>(&buf); + auto *obj = ::new (&buf) T(a0, a1, a2); + return *obj; } template <typename T, size_t N> @@ -107,6 +130,16 @@ countof(const T * const begin, const T * const end) return static_cast<size_t>(end - begin); } +_LIBCPP_NORETURN static void __throw_runtime_error(const string &msg) +{ +#ifndef _LIBCPP_NO_EXCEPTIONS + throw runtime_error(msg); +#else + (void)msg; + _VSTD::abort(); +#endif +} + } #if defined(_AIX) @@ -127,7 +160,7 @@ class _LIBCPP_HIDDEN locale::__imp : public facet { enum {N = 28}; -#if defined(_LIBCPP_MSVC) +#if defined(_LIBCPP_COMPILER_MSVC) // FIXME: MSVC doesn't support aligned parameters by value. // I can't get the __sso_allocator to work here // for MSVC I think for this reason. @@ -467,8 +500,8 @@ locale::__imp::make_global() { // only one thread can get in here and it only gets in once static aligned_storage<sizeof(locale)>::type buf; - ::new (&buf) locale(locale::classic()); - return *reinterpret_cast<locale*>(&buf); + auto *obj = ::new (&buf) locale(locale::classic()); + return *obj; } locale& @@ -566,10 +599,8 @@ locale::global(const locale& loc) locale& g = __global(); locale r = g; g = loc; -#ifndef __CloudABI__ if (g.name() != "*") setlocale(LC_ALL, g.name().c_str()); -#endif return r; } @@ -637,7 +668,7 @@ locale::id::__get() void locale::id::__init() { - __id_ = __sync_add_and_fetch(&__next_id, 1); + __id_ = __libcpp_atomic_add(&__next_id, 1); } // template <> class collate_byname<char> @@ -646,22 +677,18 @@ collate_byname<char>::collate_byname(const char* n, size_t refs) : collate<char>(refs), __l(newlocale(LC_ALL_MASK, n, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("collate_byname<char>::collate_byname" + __throw_runtime_error("collate_byname<char>::collate_byname" " failed to construct for " + string(n)); -#endif // _LIBCPP_NO_EXCEPTIONS } collate_byname<char>::collate_byname(const string& name, size_t refs) : collate<char>(refs), __l(newlocale(LC_ALL_MASK, name.c_str(), 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("collate_byname<char>::collate_byname" + __throw_runtime_error("collate_byname<char>::collate_byname" " failed to construct for " + name); -#endif // _LIBCPP_NO_EXCEPTIONS } collate_byname<char>::~collate_byname() @@ -698,22 +725,18 @@ collate_byname<wchar_t>::collate_byname(const char* n, size_t refs) : collate<wchar_t>(refs), __l(newlocale(LC_ALL_MASK, n, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)" + __throw_runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)" " failed to construct for " + string(n)); -#endif // _LIBCPP_NO_EXCEPTIONS } collate_byname<wchar_t>::collate_byname(const string& name, size_t refs) : collate<wchar_t>(refs), __l(newlocale(LC_ALL_MASK, name.c_str(), 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)" + __throw_runtime_error("collate_byname<wchar_t>::collate_byname(size_t refs)" " failed to construct for " + name); -#endif // _LIBCPP_NO_EXCEPTIONS } collate_byname<wchar_t>::~collate_byname() @@ -1106,9 +1129,7 @@ ctype<char>::classic_table() _NOEXCEPT #elif __sun__ return __ctype_mask; #elif defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) - return _ctype+1; // internal ctype mask table defined in msvcrt.dll -// This is assumed to be safe, which is a nonsense assumption because we're -// going to end up dereferencing it later... + return __pctype_func(); #elif defined(__EMSCRIPTEN__) return *__ctype_b_loc(); #elif defined(_NEWLIB_VERSION) @@ -1172,22 +1193,18 @@ ctype_byname<char>::ctype_byname(const char* name, size_t refs) : ctype<char>(0, false, refs), __l(newlocale(LC_ALL_MASK, name, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("ctype_byname<char>::ctype_byname" + __throw_runtime_error("ctype_byname<char>::ctype_byname" " failed to construct for " + string(name)); -#endif // _LIBCPP_NO_EXCEPTIONS } ctype_byname<char>::ctype_byname(const string& name, size_t refs) : ctype<char>(0, false, refs), __l(newlocale(LC_ALL_MASK, name.c_str(), 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("ctype_byname<char>::ctype_byname" + __throw_runtime_error("ctype_byname<char>::ctype_byname" " failed to construct for " + name); -#endif // _LIBCPP_NO_EXCEPTIONS } ctype_byname<char>::~ctype_byname() @@ -1229,22 +1246,18 @@ ctype_byname<wchar_t>::ctype_byname(const char* name, size_t refs) : ctype<wchar_t>(refs), __l(newlocale(LC_ALL_MASK, name, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("ctype_byname<wchar_t>::ctype_byname" + __throw_runtime_error("ctype_byname<wchar_t>::ctype_byname" " failed to construct for " + string(name)); -#endif // _LIBCPP_NO_EXCEPTIONS } ctype_byname<wchar_t>::ctype_byname(const string& name, size_t refs) : ctype<wchar_t>(refs), __l(newlocale(LC_ALL_MASK, name.c_str(), 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("ctype_byname<wchar_t>::ctype_byname" + __throw_runtime_error("ctype_byname<wchar_t>::ctype_byname" " failed to construct for " + name); -#endif // _LIBCPP_NO_EXCEPTIONS } ctype_byname<wchar_t>::~ctype_byname() @@ -1504,11 +1517,9 @@ codecvt<wchar_t, char, mbstate_t>::codecvt(const char* nm, size_t refs) : locale::facet(refs), __l(newlocale(LC_ALL_MASK, nm, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__l == 0) - throw runtime_error("codecvt_byname<wchar_t, char, mbstate_t>::codecvt_byname" + __throw_runtime_error("codecvt_byname<wchar_t, char, mbstate_t>::codecvt_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS } codecvt<wchar_t, char, mbstate_t>::~codecvt() @@ -3255,7 +3266,7 @@ __codecvt_utf8<wchar_t>::do_out(state_type&, const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt, extern_type* to, extern_type* to_end, extern_type*& to_nxt) const { -#if _WIN32 +#if defined(_LIBCPP_SHORT_WCHAR) const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm); const uint16_t* _frm_end = reinterpret_cast<const uint16_t*>(frm_end); const uint16_t* _frm_nxt = _frm; @@ -3267,7 +3278,7 @@ __codecvt_utf8<wchar_t>::do_out(state_type&, uint8_t* _to = reinterpret_cast<uint8_t*>(to); uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end); uint8_t* _to_nxt = _to; -#if _WIN32 +#if defined(_LIBCPP_SHORT_WCHAR) result r = ucs2_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt, _Maxcode_, _Mode_); #else @@ -3287,7 +3298,7 @@ __codecvt_utf8<wchar_t>::do_in(state_type&, const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm); const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end); const uint8_t* _frm_nxt = _frm; -#if _WIN32 +#if defined(_LIBCPP_SHORT_WCHAR) uint16_t* _to = reinterpret_cast<uint16_t*>(to); uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end); uint16_t* _to_nxt = _to; @@ -4191,6 +4202,54 @@ __widen_from_utf8<32>::~__widen_from_utf8() { } + +static bool checked_string_to_wchar_convert(wchar_t& dest, + const char* ptr, + locale_t loc) { + if (*ptr == '\0') + return false; + mbstate_t mb = {}; + wchar_t out; + size_t ret = __libcpp_mbrtowc_l(&out, ptr, strlen(ptr), &mb, loc); + if (ret == static_cast<size_t>(-1) || ret == static_cast<size_t>(-2)) { + return false; + } + dest = out; + return true; +} + +static bool checked_string_to_char_convert(char& dest, + const char* ptr, + locale_t __loc) { + if (*ptr == '\0') + return false; + if (!ptr[1]) { + dest = *ptr; + return true; + } + // First convert the MBS into a wide char then attempt to narrow it using + // wctob_l. + wchar_t wout; + if (!checked_string_to_wchar_convert(wout, ptr, __loc)) + return false; + int res; + if ((res = __libcpp_wctob_l(wout, __loc)) != char_traits<char>::eof()) { + dest = res; + return true; + } + // FIXME: Work around specific multibyte sequences that we can reasonable + // translate into a different single byte. + switch (wout) { + case L'\u00A0': // non-breaking space + dest = ' '; + return true; + default: + return false; + } + _LIBCPP_UNREACHABLE(); +} + + // numpunct<char> && numpunct<wchar_t> locale::id numpunct< char >::id; @@ -4256,17 +4315,16 @@ numpunct_byname<char>::__init(const char* nm) { if (strcmp(nm, "C") != 0) { - __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); -#ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == nullptr) - throw runtime_error("numpunct_byname<char>::numpunct_byname" + __libcpp_unique_locale loc(nm); + if (!loc) + __throw_runtime_error("numpunct_byname<char>::numpunct_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS + lconv* lc = __libcpp_localeconv_l(loc.get()); - if (*lc->decimal_point) - __decimal_point_ = *lc->decimal_point; - if (*lc->thousands_sep) - __thousands_sep_ = *lc->thousands_sep; + checked_string_to_char_convert(__decimal_point_, lc->decimal_point, + loc.get()); + checked_string_to_char_convert(__thousands_sep_, lc->thousands_sep, + loc.get()); __grouping_ = lc->grouping; // localization for truename and falsename is not available } @@ -4295,19 +4353,18 @@ numpunct_byname<wchar_t>::__init(const char* nm) { if (strcmp(nm, "C") != 0) { - __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); -#ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == nullptr) - throw runtime_error("numpunct_byname<char>::numpunct_byname" + __libcpp_unique_locale loc(nm); + if (!loc) + __throw_runtime_error("numpunct_byname<wchar_t>::numpunct_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS + lconv* lc = __libcpp_localeconv_l(loc.get()); - if (*lc->decimal_point) - __decimal_point_ = *lc->decimal_point; - if (*lc->thousands_sep) - __thousands_sep_ = *lc->thousands_sep; + checked_string_to_wchar_convert(__decimal_point_, lc->decimal_point, + loc.get()); + checked_string_to_wchar_convert(__thousands_sep_, lc->thousands_sep, + loc.get()); __grouping_ = lc->grouping; - // locallization for truename and falsename is not available + // localization for truename and falsename is not available } } @@ -4703,21 +4760,17 @@ __time_get_c_storage<wchar_t>::__r() const __time_get::__time_get(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__loc_ == 0) - throw runtime_error("time_get_byname" + __throw_runtime_error("time_get_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS } __time_get::__time_get(const string& nm) : __loc_(newlocale(LC_ALL_MASK, nm.c_str(), 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__loc_ == 0) - throw runtime_error("time_get_byname" + __throw_runtime_error("time_get_byname" " failed to construct for " + nm); -#endif // _LIBCPP_NO_EXCEPTIONS } __time_get::~__time_get() @@ -5363,21 +5416,17 @@ __time_get_storage<wchar_t>::__do_date_order() const __time_put::__time_put(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__loc_ == 0) - throw runtime_error("time_put_byname" + __throw_runtime_error("time_put_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS } __time_put::__time_put(const string& nm) : __loc_(newlocale(LC_ALL_MASK, nm.c_str(), 0)) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (__loc_ == 0) - throw runtime_error("time_put_byname" + __throw_runtime_error("time_put_byname" " failed to construct for " + nm); -#endif // _LIBCPP_NO_EXCEPTIONS } __time_put::~__time_put() @@ -5791,21 +5840,21 @@ void moneypunct_byname<char, false>::init(const char* nm) { typedef moneypunct<char, false> base; - __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); -#ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == nullptr) - throw runtime_error("moneypunct_byname" + __libcpp_unique_locale loc(nm); + if (!loc) + __throw_runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS + lconv* lc = __libcpp_localeconv_l(loc.get()); - if (*lc->mon_decimal_point) - __decimal_point_ = *lc->mon_decimal_point; - else - __decimal_point_ = base::do_decimal_point(); - if (*lc->mon_thousands_sep) - __thousands_sep_ = *lc->mon_thousands_sep; - else - __thousands_sep_ = base::do_thousands_sep(); + if (!checked_string_to_char_convert(__decimal_point_, + lc->mon_decimal_point, + loc.get())) + __decimal_point_ = base::do_decimal_point(); + if (!checked_string_to_char_convert(__thousands_sep_, + lc->mon_thousands_sep, + loc.get())) + __thousands_sep_ = base::do_thousands_sep(); + __grouping_ = lc->mon_grouping; __curr_symbol_ = lc->currency_symbol; if (lc->frac_digits != CHAR_MAX) @@ -5835,21 +5884,20 @@ void moneypunct_byname<char, true>::init(const char* nm) { typedef moneypunct<char, true> base; - __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); -#ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == nullptr) - throw runtime_error("moneypunct_byname" + __libcpp_unique_locale loc(nm); + if (!loc) + __throw_runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS + lconv* lc = __libcpp_localeconv_l(loc.get()); - if (*lc->mon_decimal_point) - __decimal_point_ = *lc->mon_decimal_point; - else - __decimal_point_ = base::do_decimal_point(); - if (*lc->mon_thousands_sep) - __thousands_sep_ = *lc->mon_thousands_sep; - else - __thousands_sep_ = base::do_thousands_sep(); + if (!checked_string_to_char_convert(__decimal_point_, + lc->mon_decimal_point, + loc.get())) + __decimal_point_ = base::do_decimal_point(); + if (!checked_string_to_char_convert(__thousands_sep_, + lc->mon_thousands_sep, + loc.get())) + __thousands_sep_ = base::do_thousands_sep(); __grouping_ = lc->mon_grouping; __curr_symbol_ = lc->int_curr_symbol; if (lc->int_frac_digits != CHAR_MAX) @@ -5896,21 +5944,19 @@ void moneypunct_byname<wchar_t, false>::init(const char* nm) { typedef moneypunct<wchar_t, false> base; - __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); -#ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == nullptr) - throw runtime_error("moneypunct_byname" + __libcpp_unique_locale loc(nm); + if (!loc) + __throw_runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS lconv* lc = __libcpp_localeconv_l(loc.get()); - if (*lc->mon_decimal_point) - __decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point); - else - __decimal_point_ = base::do_decimal_point(); - if (*lc->mon_thousands_sep) - __thousands_sep_ = static_cast<wchar_t>(*lc->mon_thousands_sep); - else - __thousands_sep_ = base::do_thousands_sep(); + if (!checked_string_to_wchar_convert(__decimal_point_, + lc->mon_decimal_point, + loc.get())) + __decimal_point_ = base::do_decimal_point(); + if (!checked_string_to_wchar_convert(__thousands_sep_, + lc->mon_thousands_sep, + loc.get())) + __thousands_sep_ = base::do_thousands_sep(); __grouping_ = lc->mon_grouping; wchar_t wbuf[100]; mbstate_t mb = {0}; @@ -5963,21 +6009,20 @@ void moneypunct_byname<wchar_t, true>::init(const char* nm) { typedef moneypunct<wchar_t, true> base; - __locale_unique_ptr loc(newlocale(LC_ALL_MASK, nm, 0), freelocale); -#ifndef _LIBCPP_NO_EXCEPTIONS - if (loc == nullptr) - throw runtime_error("moneypunct_byname" + __libcpp_unique_locale loc(nm); + if (!loc) + __throw_runtime_error("moneypunct_byname" " failed to construct for " + string(nm)); -#endif // _LIBCPP_NO_EXCEPTIONS + lconv* lc = __libcpp_localeconv_l(loc.get()); - if (*lc->mon_decimal_point) - __decimal_point_ = static_cast<wchar_t>(*lc->mon_decimal_point); - else - __decimal_point_ = base::do_decimal_point(); - if (*lc->mon_thousands_sep) - __thousands_sep_ = static_cast<wchar_t>(*lc->mon_thousands_sep); - else - __thousands_sep_ = base::do_thousands_sep(); + if (!checked_string_to_wchar_convert(__decimal_point_, + lc->mon_decimal_point, + loc.get())) + __decimal_point_ = base::do_decimal_point(); + if (!checked_string_to_wchar_convert(__thousands_sep_, + lc->mon_thousands_sep, + loc.get())) + __thousands_sep_ = base::do_thousands_sep(); __grouping_ = lc->mon_grouping; wchar_t wbuf[100]; mbstate_t mb = {0}; @@ -6050,69 +6095,68 @@ void __throw_runtime_error(const char* msg) throw runtime_error(msg); #else (void)msg; + _VSTD::abort(); #endif } -template class collate<char>; -template class collate<wchar_t>; - -template class num_get<char>; -template class num_get<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS collate<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS collate<wchar_t>; -template struct __num_get<char>; -template struct __num_get<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_get<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_get<wchar_t>; -template class num_put<char>; -template class num_put<wchar_t>; +template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_get<char>; +template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_get<wchar_t>; -template struct __num_put<char>; -template struct __num_put<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_put<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_put<wchar_t>; -template class time_get<char>; -template class time_get<wchar_t>; +template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_put<char>; +template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_put<wchar_t>; -template class time_get_byname<char>; -template class time_get_byname<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get<wchar_t>; -template class time_put<char>; -template class time_put<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get_byname<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get_byname<wchar_t>; -template class time_put_byname<char>; -template class time_put_byname<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put<wchar_t>; -template class moneypunct<char, false>; -template class moneypunct<char, true>; -template class moneypunct<wchar_t, false>; -template class moneypunct<wchar_t, true>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put_byname<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put_byname<wchar_t>; -template class moneypunct_byname<char, false>; -template class moneypunct_byname<char, true>; -template class moneypunct_byname<wchar_t, false>; -template class moneypunct_byname<wchar_t, true>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<char, false>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<char, true>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<wchar_t, false>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<wchar_t, true>; -template class money_get<char>; -template class money_get<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<char, false>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<char, true>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<wchar_t, false>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<wchar_t, true>; -template class __money_get<char>; -template class __money_get<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_get<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_get<wchar_t>; -template class money_put<char>; -template class money_put<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_get<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_get<wchar_t>; -template class __money_put<char>; -template class __money_put<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_put<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_put<wchar_t>; -template class messages<char>; -template class messages<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_put<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_put<wchar_t>; -template class messages_byname<char>; -template class messages_byname<wchar_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages<wchar_t>; -template class codecvt_byname<char, char, mbstate_t>; -template class codecvt_byname<wchar_t, char, mbstate_t>; -template class codecvt_byname<char16_t, char, mbstate_t>; -template class codecvt_byname<char32_t, char, mbstate_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<char>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<wchar_t>; -template class __vector_base_common<true>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char, char, mbstate_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<wchar_t, char, mbstate_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>; +template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>; _LIBCPP_END_NAMESPACE_STD |