diff options
Diffstat (limited to 'gnu/llvm/libcxx/include/__locale')
-rw-r--r-- | gnu/llvm/libcxx/include/__locale | 235 |
1 files changed, 146 insertions, 89 deletions
diff --git a/gnu/llvm/libcxx/include/__locale b/gnu/llvm/libcxx/include/__locale index ad742997d9a..e0ffa0ca00f 100644 --- a/gnu/llvm/libcxx/include/__locale +++ b/gnu/llvm/libcxx/include/__locale @@ -12,31 +12,30 @@ #include <__availability> #include <__config> -#include <string> -#include <memory> -#include <utility> -#include <mutex> -#include <cstdint> #include <cctype> +#include <cstdint> #include <locale.h> +#include <mutex> +#include <string> + +// Some platforms require more includes than others. Keep the includes on all plaforms for now. +#include <cstddef> +#include <cstring> + #if defined(_LIBCPP_MSVCRT_LIKE) -# include <cstring> # include <__support/win32/locale_win32.h> -#elif defined(__NuttX__) -# include <__support/nuttx/xlocale.h> #elif defined(_AIX) || defined(__MVS__) # include <__support/ibm/xlocale.h> #elif defined(__ANDROID__) # include <__support/android/locale_bionic.h> #elif defined(__sun__) -# include <xlocale.h> # include <__support/solaris/xlocale.h> +# include <xlocale.h> #elif defined(_NEWLIB_VERSION) # include <__support/newlib/xlocale.h> #elif defined(__OpenBSD__) # include <__support/openbsd/xlocale.h> -#elif (defined(__APPLE__) || defined(__FreeBSD__) \ - || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) +#elif (defined(__APPLE__) || defined(__FreeBSD__)) # include <xlocale.h> #elif defined(__Fuchsia__) # include <__support/fuchsia/xlocale.h> @@ -48,7 +47,7 @@ #endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD @@ -194,12 +193,12 @@ protected: explicit facet(size_t __refs = 0) : __shared_count(static_cast<long>(__refs)-1) {} - virtual ~facet(); + ~facet() override; // facet(const facet&) = delete; // effectively done in __shared_count // void operator=(const facet&) = delete; private: - virtual void __on_zero_shared() _NOEXCEPT; + void __on_zero_shared() _NOEXCEPT override; }; class _LIBCPP_TYPE_VIS locale::id @@ -210,10 +209,11 @@ class _LIBCPP_TYPE_VIS locale::id static int32_t __next_id; public: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {} + void operator=(const id&) = delete; + id(const id&) = delete; + private: void __init(); - void operator=(const id&); // = delete; - id(const id&); // = delete; public: // only needed for tests long __get(); @@ -293,7 +293,7 @@ public: static locale::id id; protected: - ~collate(); + ~collate() override; virtual int do_compare(const char_type* __lo1, const char_type* __hi1, const char_type* __lo2, const char_type* __hi2) const; virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const @@ -339,8 +339,10 @@ collate<_CharT>::do_hash(const char_type* __lo, const char_type* __hi) const return static_cast<long>(__h); } -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>) -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>) +extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS +extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>; +#endif // template <class CharT> class collate_byname; @@ -350,7 +352,7 @@ template <> class _LIBCPP_TYPE_VIS collate_byname<char> : public collate<char> { - locale_t __l; + locale_t __l_; public: typedef char char_type; typedef basic_string<char_type> string_type; @@ -359,17 +361,18 @@ public: explicit collate_byname(const string& __n, size_t __refs = 0); protected: - ~collate_byname(); - virtual int do_compare(const char_type* __lo1, const char_type* __hi1, - const char_type* __lo2, const char_type* __hi2) const; - virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const; + ~collate_byname() override; + int do_compare(const char_type* __lo1, const char_type* __hi1, + const char_type* __lo2, const char_type* __hi2) const override; + string_type do_transform(const char_type* __lo, const char_type* __hi) const override; }; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS collate_byname<wchar_t> : public collate<wchar_t> { - locale_t __l; + locale_t __l_; public: typedef wchar_t char_type; typedef basic_string<char_type> string_type; @@ -378,12 +381,13 @@ public: explicit collate_byname(const string& __n, size_t __refs = 0); protected: - ~collate_byname(); + ~collate_byname() override; - virtual int do_compare(const char_type* __lo1, const char_type* __hi1, - const char_type* __lo2, const char_type* __hi2) const; - virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const; + int do_compare(const char_type* __lo1, const char_type* __hi1, + const char_type* __lo2, const char_type* __hi2) const override; + string_type do_transform(const char_type* __lo, const char_type* __hi) const override; }; +#endif template <class _CharT, class _Traits, class _Allocator> bool @@ -448,8 +452,9 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; - static const mask __regex_word = 0x80; + static const mask __regex_word = 0x4000; // 0x8000 and 0x0100 and 0x00ff are used # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT +# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) # ifdef __APPLE__ typedef __uint32_t mask; @@ -489,7 +494,11 @@ public: static const mask punct = _ISPUNCT; static const mask xdigit = _ISXDIGIT; static const mask blank = _ISBLANK; +# if defined(_AIX) + static const mask __regex_word = 0x8000; +# else static const mask __regex_word = 0x80; +# endif #elif defined(_NEWLIB_VERSION) // Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h. typedef char mask; @@ -503,10 +512,38 @@ public: static const mask punct = _P; static const mask xdigit = _X | _N; static const mask blank = _B; - static const mask __regex_word = 0x80; + // mask is already fully saturated, use a different type in regex_type_traits. + static const unsigned short __regex_word = 0x100; # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA # define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT +#elif defined(__MVS__) +# if defined(__NATIVE_ASCII_F) + typedef unsigned int mask; + static const mask space = _ISSPACE_A; + static const mask print = _ISPRINT_A; + static const mask cntrl = _ISCNTRL_A; + static const mask upper = _ISUPPER_A; + static const mask lower = _ISLOWER_A; + static const mask alpha = _ISALPHA_A; + static const mask digit = _ISDIGIT_A; + static const mask punct = _ISPUNCT_A; + static const mask xdigit = _ISXDIGIT_A; + static const mask blank = _ISBLANK_A; +# else + typedef unsigned short mask; + static const mask space = __ISSPACE; + static const mask print = __ISPRINT; + static const mask cntrl = __ISCNTRL; + static const mask upper = __ISUPPER; + static const mask lower = __ISLOWER; + static const mask alpha = __ISALPHA; + static const mask digit = __ISDIGIT; + static const mask punct = __ISPUNCT; + static const mask xdigit = __ISXDIGIT; + static const mask blank = __ISBLANK; +# endif + static const mask __regex_word = 0x8000; #else # error unknown rune table for this platform -- do you mean to define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE? #endif @@ -514,10 +551,15 @@ public: static const mask graph = alnum | punct; _LIBCPP_INLINE_VISIBILITY ctype_base() {} + + static_assert((__regex_word & ~(std::make_unsigned<mask>::type)(space | print | cntrl | upper | lower | alpha | + digit | punct | xdigit | blank)) == __regex_word, + "__regex_word can't overlap other bits"); }; template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS ctype<wchar_t> : public locale::facet, @@ -605,7 +647,7 @@ public: static locale::id id; protected: - ~ctype(); + ~ctype() override; virtual bool do_is(mask __m, char_type __c) const; virtual const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const; virtual const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const; @@ -619,6 +661,7 @@ protected: virtual char do_narrow(char_type, char __dfault) const; virtual const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const; }; +#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS ctype<char> @@ -658,7 +701,7 @@ public: const char_type* scan_not(mask __m, const char_type* __low, const char_type* __high) const { for (; __low != __high; ++__low) - if (!(isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m))) + if (!isascii(*__low) || !(__tab_[static_cast<int>(*__low)] & __m)) break; return __low; } @@ -728,9 +771,13 @@ public: static const short* __classic_upper_table() _NOEXCEPT; static const short* __classic_lower_table() _NOEXCEPT; #endif +#if defined(__MVS__) + static const unsigned short* __classic_upper_table() _NOEXCEPT; + static const unsigned short* __classic_lower_table() _NOEXCEPT; +#endif protected: - ~ctype(); + ~ctype() override; virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const; virtual char_type do_tolower(char_type __c) const; @@ -749,52 +796,54 @@ template <> class _LIBCPP_TYPE_VIS ctype_byname<char> : public ctype<char> { - locale_t __l; + locale_t __l_; public: explicit ctype_byname(const char*, size_t = 0); explicit ctype_byname(const string&, size_t = 0); protected: - ~ctype_byname(); - virtual char_type do_toupper(char_type) const; - virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const; - virtual char_type do_tolower(char_type) const; - virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const; + ~ctype_byname() override; + char_type do_toupper(char_type) const override; + const char_type* do_toupper(char_type* __low, const char_type* __high) const override; + char_type do_tolower(char_type) const override; + const char_type* do_tolower(char_type* __low, const char_type* __high) const override; }; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS ctype_byname<wchar_t> : public ctype<wchar_t> { - locale_t __l; + locale_t __l_; public: explicit ctype_byname(const char*, size_t = 0); explicit ctype_byname(const string&, size_t = 0); protected: - ~ctype_byname(); - virtual bool do_is(mask __m, char_type __c) const; - virtual const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const; - virtual const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const; - virtual const char_type* do_scan_not(mask __m, const char_type* __low, const char_type* __high) const; - virtual char_type do_toupper(char_type) const; - virtual const char_type* do_toupper(char_type* __low, const char_type* __high) const; - virtual char_type do_tolower(char_type) const; - virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const; - virtual char_type do_widen(char) const; - virtual const char* do_widen(const char* __low, const char* __high, char_type* __dest) const; - virtual char do_narrow(char_type, char __dfault) const; - virtual const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const; + ~ctype_byname() override; + bool do_is(mask __m, char_type __c) const override; + const char_type* do_is(const char_type* __low, const char_type* __high, mask* __vec) const override; + const char_type* do_scan_is(mask __m, const char_type* __low, const char_type* __high) const override; + const char_type* do_scan_not(mask __m, const char_type* __low, const char_type* __high) const override; + char_type do_toupper(char_type) const override; + const char_type* do_toupper(char_type* __low, const char_type* __high) const override; + char_type do_tolower(char_type) const override; + const char_type* do_tolower(char_type* __low, const char_type* __high) const override; + char_type do_widen(char) const override; + const char* do_widen(const char* __low, const char* __high, char_type* __dest) const override; + char do_narrow(char_type, char __dfault) const override; + const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const override; }; +#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS template <class _CharT> inline _LIBCPP_INLINE_VISIBILITY bool isspace(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } template <class _CharT> @@ -802,7 +851,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isprint(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } template <class _CharT> @@ -810,7 +859,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool iscntrl(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } template <class _CharT> @@ -818,7 +867,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isupper(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } template <class _CharT> @@ -826,7 +875,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool islower(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } template <class _CharT> @@ -834,7 +883,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isalpha(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } template <class _CharT> @@ -842,7 +891,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isdigit(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } template <class _CharT> @@ -850,7 +899,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool ispunct(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } template <class _CharT> @@ -858,7 +907,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isxdigit(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } template <class _CharT> @@ -866,7 +915,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isalnum(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } template <class _CharT> @@ -874,7 +923,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool isgraph(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); + return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } template <class _CharT> @@ -882,7 +931,7 @@ inline _LIBCPP_INLINE_VISIBILITY _CharT toupper(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).toupper(__c); + return std::use_facet<ctype<_CharT> >(__loc).toupper(__c); } template <class _CharT> @@ -890,7 +939,7 @@ inline _LIBCPP_INLINE_VISIBILITY _CharT tolower(_CharT __c, const locale& __loc) { - return use_facet<ctype<_CharT> >(__loc).tolower(__c); + return std::use_facet<ctype<_CharT> >(__loc).tolower(__c); } // codecvt_base @@ -976,7 +1025,7 @@ protected: explicit codecvt(const char*, size_t __refs = 0) : locale::facet(__refs) {} - ~codecvt(); + ~codecvt() override; virtual result do_out(state_type& __st, const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, @@ -994,12 +1043,13 @@ protected: // template <> class codecvt<wchar_t, char, mbstate_t> +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS codecvt<wchar_t, char, mbstate_t> : public locale::facet, public codecvt_base { - locale_t __l; + locale_t __l_; public: typedef wchar_t intern_type; typedef char extern_type; @@ -1059,7 +1109,7 @@ public: protected: explicit codecvt(const char*, size_t __refs = 0); - ~codecvt(); + ~codecvt() override; virtual result do_out(state_type& __st, const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, @@ -1074,6 +1124,7 @@ protected: virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; virtual int do_max_length() const _NOEXCEPT; }; +#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS // template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20 @@ -1145,7 +1196,7 @@ protected: explicit codecvt(const char*, size_t __refs = 0) : locale::facet(__refs) {} - ~codecvt(); + ~codecvt() override; virtual result do_out(state_type& __st, const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, @@ -1233,7 +1284,7 @@ protected: explicit codecvt(const char*, size_t __refs = 0) : locale::facet(__refs) {} - ~codecvt(); + ~codecvt() override; virtual result do_out(state_type& __st, const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, @@ -1321,7 +1372,7 @@ protected: explicit codecvt(const char*, size_t __refs = 0) : locale::facet(__refs) {} - ~codecvt(); + ~codecvt() override; virtual result do_out(state_type& __st, const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, @@ -1409,7 +1460,7 @@ protected: explicit codecvt(const char*, size_t __refs = 0) : locale::facet(__refs) {} - ~codecvt(); + ~codecvt() override; virtual result do_out(state_type& __st, const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt, @@ -1441,7 +1492,7 @@ public: explicit codecvt_byname(const string& __nm, size_t __refs = 0) : codecvt<_InternT, _ExternT, _StateT>(__nm.c_str(), __refs) {} protected: - ~codecvt_byname(); + ~codecvt_byname() override; }; _LIBCPP_SUPPRESS_DEPRECATED_PUSH @@ -1451,13 +1502,15 @@ codecvt_byname<_InternT, _ExternT, _StateT>::~codecvt_byname() } _LIBCPP_SUPPRESS_DEPRECATED_POP -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>) -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>) -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>) // deprecated in C++20 -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>) // deprecated in C++20 +extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS +extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>; +#endif +extern template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20 +extern template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20 #ifndef _LIBCPP_HAS_NO_CHAR8_T -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>) // C++20 -_LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>) // C++20 +extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; // C++20 +extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>; // C++20 #endif template <size_t _Np> @@ -1491,7 +1544,7 @@ struct _LIBCPP_TYPE_VIS __narrow_to_utf8<16> __narrow_to_utf8() : codecvt<char16_t, char, mbstate_t>(1) {} _LIBCPP_SUPPRESS_DEPRECATED_POP - ~__narrow_to_utf8(); + ~__narrow_to_utf8() override; template <class _OutputIterator, class _CharT> _LIBCPP_INLINE_VISIBILITY @@ -1527,7 +1580,7 @@ struct _LIBCPP_TYPE_VIS __narrow_to_utf8<32> __narrow_to_utf8() : codecvt<char32_t, char, mbstate_t>(1) {} _LIBCPP_SUPPRESS_DEPRECATED_POP - ~__narrow_to_utf8(); + ~__narrow_to_utf8() override; template <class _OutputIterator, class _CharT> _LIBCPP_INLINE_VISIBILITY @@ -1585,7 +1638,7 @@ struct _LIBCPP_TYPE_VIS __widen_from_utf8<16> __widen_from_utf8() : codecvt<char16_t, char, mbstate_t>(1) {} _LIBCPP_SUPPRESS_DEPRECATED_POP - ~__widen_from_utf8(); + ~__widen_from_utf8() override; template <class _OutputIterator> _LIBCPP_INLINE_VISIBILITY @@ -1621,7 +1674,7 @@ struct _LIBCPP_TYPE_VIS __widen_from_utf8<32> __widen_from_utf8() : codecvt<char32_t, char, mbstate_t>(1) {} _LIBCPP_SUPPRESS_DEPRECATED_POP - ~__widen_from_utf8(); + ~__widen_from_utf8() override; template <class _OutputIterator> _LIBCPP_INLINE_VISIBILITY @@ -1671,7 +1724,7 @@ public: static locale::id id; protected: - ~numpunct(); + ~numpunct() override; virtual char_type do_decimal_point() const; virtual char_type do_thousands_sep() const; virtual string do_grouping() const; @@ -1683,6 +1736,7 @@ protected: string __grouping_; }; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS numpunct<wchar_t> : public locale::facet @@ -1702,7 +1756,7 @@ public: static locale::id id; protected: - ~numpunct(); + ~numpunct() override; virtual char_type do_decimal_point() const; virtual char_type do_thousands_sep() const; virtual string do_grouping() const; @@ -1713,6 +1767,7 @@ protected: char_type __thousands_sep_; string __grouping_; }; +#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS // template <class charT> class numpunct_byname @@ -1730,12 +1785,13 @@ public: explicit numpunct_byname(const string& __nm, size_t __refs = 0); protected: - ~numpunct_byname(); + ~numpunct_byname() override; private: void __init(const char*); }; +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS template <> class _LIBCPP_TYPE_VIS numpunct_byname<wchar_t> : public numpunct<wchar_t> @@ -1748,11 +1804,12 @@ public: explicit numpunct_byname(const string& __nm, size_t __refs = 0); protected: - ~numpunct_byname(); + ~numpunct_byname() override; private: void __init(const char*); }; +#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS _LIBCPP_END_NAMESPACE_STD |