mirror of git://gcc.gnu.org/git/gcc.git
Remove char16_t and char32_t dependency on <stdint.h>
The char16_t and char32_t types are automatically defined by the compiler and do not depend on support in <stdint.h>. The char_traits specializations depend on uint_leastNN_t but can be made to work anyway by using the predefined macros, or as a last resort make_unsigned. * include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1] (hash<u16string>, hash<u32string>): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1. * include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1] (char_traits<char16_t>, char_traits<char32_t>): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and __UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable. * include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt<char16_t, char, mbstate_t>) (codecvt<char32_t, char, mbstate_t>) (codecvt_byname<char16_t, char, mbstate_t>) (codecvt_byname<char32_t, char, mbstate_t>): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1. * include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1] (_GLIBCXX_NUM_UNICODE_FACETS): Likewise. * include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1] (char_traits<char16_t>, char_traits<char32_t>) (basic_string<char16_t>, basic_string<char32_t>): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1. * include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1] (u16string_view, u32string_view, hash<u16string_view>) (hash<u32string_view>, operator""sv(const char16_t, size_t)) (operator""sv(const char32_t, size_t)): Likewise. * include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1] (hash<__u16vstring>, hash<__u32vstring>): Likewise. * include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1] (__u16vstring, __u16sso_string, __u16rc_string, __u32vstring) (__u32sso_string, __u32rc_string): Likewise. * include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode) (codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise. * include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1] (u16string_view, u32string_view, hash<u16string_view>) (hash<u32string_view>, operator""sv(const char16_t, size_t)) (operator""sv(const char32_t, size_t)): Likewise. * src/c++11/codecvt.cc: Likewise. * src/c++98/locale_init.cc: Likewise. * src/c++98/localename.cc: Likewise. From-SVN: r263002
This commit is contained in:
parent
8ba7f29e3d
commit
612c9c702e
|
|
@ -1,5 +1,43 @@
|
||||||
2018-07-26 Jonathan Wakely <jwakely@redhat.com>
|
2018-07-26 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(hash<u16string>, hash<u32string>): Remove dependency on
|
||||||
|
_GLIBCXX_USE_C99_STDINT_TR1.
|
||||||
|
* include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(char_traits<char16_t>, char_traits<char32_t>): Remove dependency on
|
||||||
|
_GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and
|
||||||
|
__UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable.
|
||||||
|
* include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(codecvt<char16_t, char, mbstate_t>)
|
||||||
|
(codecvt<char32_t, char, mbstate_t>)
|
||||||
|
(codecvt_byname<char16_t, char, mbstate_t>)
|
||||||
|
(codecvt_byname<char32_t, char, mbstate_t>): Remove dependency
|
||||||
|
on _GLIBCXX_USE_C99_STDINT_TR1.
|
||||||
|
* include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(_GLIBCXX_NUM_UNICODE_FACETS): Likewise.
|
||||||
|
* include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(char_traits<char16_t>, char_traits<char32_t>)
|
||||||
|
(basic_string<char16_t>, basic_string<char32_t>): Remove dependency
|
||||||
|
on _GLIBCXX_USE_C99_STDINT_TR1.
|
||||||
|
* include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(u16string_view, u32string_view, hash<u16string_view>)
|
||||||
|
(hash<u32string_view>, operator""sv(const char16_t, size_t))
|
||||||
|
(operator""sv(const char32_t, size_t)): Likewise.
|
||||||
|
* include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(hash<__u16vstring>, hash<__u32vstring>): Likewise.
|
||||||
|
* include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(__u16vstring, __u16sso_string, __u16rc_string, __u32vstring)
|
||||||
|
(__u32sso_string, __u32rc_string): Likewise.
|
||||||
|
* include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode)
|
||||||
|
(codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise.
|
||||||
|
* include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
|
(u16string_view, u32string_view, hash<u16string_view>)
|
||||||
|
(hash<u32string_view>, operator""sv(const char16_t, size_t))
|
||||||
|
(operator""sv(const char32_t, size_t)): Likewise.
|
||||||
|
* src/c++11/codecvt.cc: Likewise.
|
||||||
|
* src/c++98/locale_init.cc: Likewise.
|
||||||
|
* src/c++98/localename.cc: Likewise.
|
||||||
|
|
||||||
* include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
* include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||||
(__atomic_futex_unsigned_base): Remove dependency on
|
(__atomic_futex_unsigned_base): Remove dependency on
|
||||||
_GLIBCXX_USE_C99_STDINT_TR1 macro.
|
_GLIBCXX_USE_C99_STDINT_TR1 macro.
|
||||||
|
|
|
||||||
|
|
@ -6662,7 +6662,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
#endif
|
#endif
|
||||||
#endif /* _GLIBCXX_COMPATIBILITY_CXX0X */
|
#endif /* _GLIBCXX_COMPATIBILITY_CXX0X */
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
/// std::hash specialization for u16string.
|
/// std::hash specialization for u16string.
|
||||||
template<>
|
template<>
|
||||||
struct hash<u16string>
|
struct hash<u16string>
|
||||||
|
|
@ -6692,7 +6691,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
template<>
|
template<>
|
||||||
struct __is_fast_hash<hash<u32string>> : std::false_type
|
struct __is_fast_hash<hash<u32string>> : std::false_type
|
||||||
{ };
|
{ };
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __cplusplus > 201103L
|
#if __cplusplus > 201103L
|
||||||
|
|
||||||
|
|
@ -6716,7 +6714,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
{ return basic_string<wchar_t>{__str, __len}; }
|
{ return basic_string<wchar_t>{__str, __len}; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
_GLIBCXX_DEFAULT_ABI_TAG
|
_GLIBCXX_DEFAULT_ABI_TAG
|
||||||
inline basic_string<char16_t>
|
inline basic_string<char16_t>
|
||||||
operator""s(const char16_t* __str, size_t __len)
|
operator""s(const char16_t* __str, size_t __len)
|
||||||
|
|
@ -6726,7 +6723,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
inline basic_string<char32_t>
|
inline basic_string<char32_t>
|
||||||
operator""s(const char32_t* __str, size_t __len)
|
operator""s(const char32_t* __str, size_t __len)
|
||||||
{ return basic_string<char32_t>{__str, __len}; }
|
{ return basic_string<char32_t>{__str, __len}; }
|
||||||
#endif
|
|
||||||
|
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
} // inline namespace string_literals
|
} // inline namespace string_literals
|
||||||
|
|
|
||||||
|
|
@ -495,8 +495,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if ((__cplusplus >= 201103L) \
|
#if __cplusplus >= 201103L
|
||||||
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
@ -508,7 +507,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
struct char_traits<char16_t>
|
struct char_traits<char16_t>
|
||||||
{
|
{
|
||||||
typedef char16_t char_type;
|
typedef char16_t char_type;
|
||||||
|
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||||
typedef uint_least16_t int_type;
|
typedef uint_least16_t int_type;
|
||||||
|
#elif defined __UINT_LEAST16_TYPE__
|
||||||
|
typedef __UINT_LEAST16_TYPE__ int_type;
|
||||||
|
#else
|
||||||
|
typedef make_unsigned<char16_t>::type int_type;
|
||||||
|
#endif
|
||||||
typedef streamoff off_type;
|
typedef streamoff off_type;
|
||||||
typedef u16streampos pos_type;
|
typedef u16streampos pos_type;
|
||||||
typedef mbstate_t state_type;
|
typedef mbstate_t state_type;
|
||||||
|
|
@ -605,7 +610,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
struct char_traits<char32_t>
|
struct char_traits<char32_t>
|
||||||
{
|
{
|
||||||
typedef char32_t char_type;
|
typedef char32_t char_type;
|
||||||
|
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||||
typedef uint_least32_t int_type;
|
typedef uint_least32_t int_type;
|
||||||
|
#elif defined __UINT_LEAST32_TYPE__
|
||||||
|
typedef __UINT_LEAST32_TYPE__ int_type;
|
||||||
|
#else
|
||||||
|
typedef make_unsigned<char32_t>::type int_type;
|
||||||
|
#endif
|
||||||
typedef streamoff off_type;
|
typedef streamoff off_type;
|
||||||
typedef u32streampos pos_type;
|
typedef u32streampos pos_type;
|
||||||
typedef mbstate_t state_type;
|
typedef mbstate_t state_type;
|
||||||
|
|
@ -701,6 +712,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif
|
#endif // C++11
|
||||||
|
|
||||||
#endif // _CHAR_TRAITS_H
|
#endif // _CHAR_TRAITS_H
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
#endif //_GLIBCXX_USE_WCHAR_T
|
#endif //_GLIBCXX_USE_WCHAR_T
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
/** @brief Class codecvt<char16_t, char, mbstate_t> specialization.
|
/** @brief Class codecvt<char16_t, char, mbstate_t> specialization.
|
||||||
*
|
*
|
||||||
* Converts between UTF-16 and UTF-8.
|
* Converts between UTF-16 and UTF-8.
|
||||||
|
|
@ -574,7 +573,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
do_max_length() const throw();
|
do_max_length() const throw();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
#endif // C++11
|
#endif // C++11
|
||||||
|
|
||||||
/// class codecvt_byname [22.2.1.6].
|
/// class codecvt_byname [22.2.1.6].
|
||||||
|
|
@ -605,7 +603,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
~codecvt_byname() { }
|
~codecvt_byname() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
#if __cplusplus >= 201103L
|
||||||
template<>
|
template<>
|
||||||
class codecvt_byname<char16_t, char, mbstate_t>
|
class codecvt_byname<char16_t, char, mbstate_t>
|
||||||
: public codecvt<char16_t, char, mbstate_t>
|
: public codecvt<char16_t, char, mbstate_t>
|
||||||
|
|
@ -641,7 +639,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
virtual
|
virtual
|
||||||
~codecvt_byname() { }
|
~codecvt_byname() { }
|
||||||
};
|
};
|
||||||
#endif
|
#endif // C++11
|
||||||
|
|
||||||
// Inhibit implicit instantiations for required instantiations,
|
// Inhibit implicit instantiations for required instantiations,
|
||||||
// which are defined via explicit instantiations elsewhere.
|
// which are defined via explicit instantiations elsewhere.
|
||||||
|
|
@ -668,7 +666,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
|
has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99_STDINT_TR1)
|
#if __cplusplus >= 201103L
|
||||||
extern template class codecvt_byname<char16_t, char, mbstate_t>;
|
extern template class codecvt_byname<char16_t, char, mbstate_t>;
|
||||||
extern template class codecvt_byname<char32_t, char, mbstate_t>;
|
extern template class codecvt_byname<char32_t, char, mbstate_t>;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
# define _GLIBCXX_NUM_FACETS 14
|
# define _GLIBCXX_NUM_FACETS 14
|
||||||
# define _GLIBCXX_NUM_CXX11_FACETS 8
|
# define _GLIBCXX_NUM_CXX11_FACETS 8
|
||||||
#endif
|
#endif
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
#define _GLIBCXX_NUM_UNICODE_FACETS 2
|
#define _GLIBCXX_NUM_UNICODE_FACETS 2
|
||||||
#else
|
|
||||||
# define _GLIBCXX_NUM_UNICODE_FACETS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Convert string to numeric value of type _Tp and store results.
|
// Convert string to numeric value of type _Tp and store results.
|
||||||
// NB: This is specialized for all required types, there is no
|
// NB: This is specialized for all required types, there is no
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
template<> struct char_traits<wchar_t>;
|
template<> struct char_traits<wchar_t>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((__cplusplus >= 201103L) \
|
#if __cplusplus >= 201103L
|
||||||
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
|
|
||||||
template<> struct char_traits<char16_t>;
|
template<> struct char_traits<char16_t>;
|
||||||
template<> struct char_traits<char32_t>;
|
template<> struct char_traits<char32_t>;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -78,8 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
||||||
typedef basic_string<wchar_t> wstring;
|
typedef basic_string<wchar_t> wstring;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((__cplusplus >= 201103L) \
|
#if __cplusplus >= 201103L
|
||||||
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
|
|
||||||
/// A string of @c char16_t
|
/// A string of @c char16_t
|
||||||
typedef basic_string<char16_t> u16string;
|
typedef basic_string<char16_t> u16string;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -566,10 +566,8 @@ inline namespace fundamentals_v1
|
||||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||||
using wstring_view = basic_string_view<wchar_t>;
|
using wstring_view = basic_string_view<wchar_t>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
using u16string_view = basic_string_view<char16_t>;
|
using u16string_view = basic_string_view<char16_t>;
|
||||||
using u32string_view = basic_string_view<char32_t>;
|
using u32string_view = basic_string_view<char32_t>;
|
||||||
#endif
|
|
||||||
} // namespace fundamentals_v1
|
} // namespace fundamentals_v1
|
||||||
} // namespace experimental
|
} // namespace experimental
|
||||||
|
|
||||||
|
|
@ -607,7 +605,6 @@ inline namespace fundamentals_v1
|
||||||
{ };
|
{ };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
template<>
|
template<>
|
||||||
struct hash<experimental::u16string_view>
|
struct hash<experimental::u16string_view>
|
||||||
: public __hash_base<size_t, experimental::u16string_view>
|
: public __hash_base<size_t, experimental::u16string_view>
|
||||||
|
|
@ -635,7 +632,6 @@ inline namespace fundamentals_v1
|
||||||
template<>
|
template<>
|
||||||
struct __is_fast_hash<hash<experimental::u32string_view>> : std::false_type
|
struct __is_fast_hash<hash<experimental::u32string_view>> : std::false_type
|
||||||
{ };
|
{ };
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace experimental
|
namespace experimental
|
||||||
{
|
{
|
||||||
|
|
@ -656,7 +652,6 @@ namespace experimental
|
||||||
{ return basic_string_view<wchar_t>{__str, __len}; }
|
{ return basic_string_view<wchar_t>{__str, __len}; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
inline constexpr basic_string_view<char16_t>
|
inline constexpr basic_string_view<char16_t>
|
||||||
operator""sv(const char16_t* __str, size_t __len) noexcept
|
operator""sv(const char16_t* __str, size_t __len) noexcept
|
||||||
{ return basic_string_view<char16_t>{__str, __len}; }
|
{ return basic_string_view<char16_t>{__str, __len}; }
|
||||||
|
|
@ -664,7 +659,6 @@ namespace experimental
|
||||||
inline constexpr basic_string_view<char32_t>
|
inline constexpr basic_string_view<char32_t>
|
||||||
operator""sv(const char32_t* __str, size_t __len) noexcept
|
operator""sv(const char32_t* __str, size_t __len) noexcept
|
||||||
{ return basic_string_view<char32_t>{__str, __len}; }
|
{ return basic_string_view<char32_t>{__str, __len}; }
|
||||||
#endif
|
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
} // namespace string_literals
|
} // namespace string_literals
|
||||||
} // namespace literals
|
} // namespace literals
|
||||||
|
|
|
||||||
|
|
@ -2933,7 +2933,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
/// std::hash specialization for __u16vstring.
|
/// std::hash specialization for __u16vstring.
|
||||||
template<>
|
template<>
|
||||||
struct hash<__gnu_cxx::__u16vstring>
|
struct hash<__gnu_cxx::__u16vstring>
|
||||||
|
|
@ -2955,7 +2954,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
{ return std::_Hash_impl::hash(__s.data(),
|
{ return std::_Hash_impl::hash(__s.data(),
|
||||||
__s.length() * sizeof(char32_t)); }
|
__s.length() * sizeof(char32_t)); }
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
||||||
|
|
@ -66,9 +66,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
std::allocator<wchar_t>, __rc_string_base> __wrc_string;
|
std::allocator<wchar_t>, __rc_string_base> __wrc_string;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ((__cplusplus >= 201103L) \
|
#if __cplusplus >= 201103L
|
||||||
&& defined(_GLIBCXX_USE_C99_STDINT_TR1))
|
|
||||||
|
|
||||||
typedef __versa_string<char16_t> __u16vstring;
|
typedef __versa_string<char16_t> __u16vstring;
|
||||||
typedef __u16vstring __u16sso_string;
|
typedef __u16vstring __u16sso_string;
|
||||||
typedef
|
typedef
|
||||||
|
|
@ -80,8 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
typedef
|
typedef
|
||||||
__versa_string<char32_t, std::char_traits<char32_t>,
|
__versa_string<char32_t, std::char_traits<char32_t>,
|
||||||
std::allocator<char32_t>, __rc_string_base> __u32rc_string;
|
std::allocator<char32_t>, __rc_string_base> __u32rc_string;
|
||||||
|
#endif // C++11
|
||||||
#endif
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,6 @@
|
||||||
#include <bits/locale_classes.h>
|
#include <bits/locale_classes.h>
|
||||||
#include <bits/codecvt.h>
|
#include <bits/codecvt.h>
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
|
|
||||||
namespace std _GLIBCXX_VISIBILITY(default)
|
namespace std _GLIBCXX_VISIBILITY(default)
|
||||||
{
|
{
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
@ -174,8 +172,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
#endif // C++11
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _GLIBCXX_CODECVT */
|
#endif /* _GLIBCXX_CODECVT */
|
||||||
|
|
|
||||||
|
|
@ -555,10 +555,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
#ifdef _GLIBCXX_USE_WCHAR_T
|
#ifdef _GLIBCXX_USE_WCHAR_T
|
||||||
using wstring_view = basic_string_view<wchar_t>;
|
using wstring_view = basic_string_view<wchar_t>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
using u16string_view = basic_string_view<char16_t>;
|
using u16string_view = basic_string_view<char16_t>;
|
||||||
using u32string_view = basic_string_view<char32_t>;
|
using u32string_view = basic_string_view<char32_t>;
|
||||||
#endif
|
|
||||||
|
|
||||||
// [string.view.hash], hash support:
|
// [string.view.hash], hash support:
|
||||||
|
|
||||||
|
|
@ -594,7 +593,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
{ };
|
{ };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
template<>
|
template<>
|
||||||
struct hash<u16string_view>
|
struct hash<u16string_view>
|
||||||
: public __hash_base<size_t, u16string_view>
|
: public __hash_base<size_t, u16string_view>
|
||||||
|
|
@ -622,7 +620,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
template<>
|
template<>
|
||||||
struct __is_fast_hash<hash<u32string_view>> : std::false_type
|
struct __is_fast_hash<hash<u32string_view>> : std::false_type
|
||||||
{ };
|
{ };
|
||||||
#endif
|
|
||||||
|
|
||||||
inline namespace literals
|
inline namespace literals
|
||||||
{
|
{
|
||||||
|
|
@ -640,7 +637,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
{ return basic_string_view<wchar_t>{__str, __len}; }
|
{ return basic_string_view<wchar_t>{__str, __len}; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
inline constexpr basic_string_view<char16_t>
|
inline constexpr basic_string_view<char16_t>
|
||||||
operator""sv(const char16_t* __str, size_t __len) noexcept
|
operator""sv(const char16_t* __str, size_t __len) noexcept
|
||||||
{ return basic_string_view<char16_t>{__str, __len}; }
|
{ return basic_string_view<char16_t>{__str, __len}; }
|
||||||
|
|
@ -648,7 +644,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
inline constexpr basic_string_view<char32_t>
|
inline constexpr basic_string_view<char32_t>
|
||||||
operator""sv(const char32_t* __str, size_t __len) noexcept
|
operator""sv(const char32_t* __str, size_t __len) noexcept
|
||||||
{ return basic_string_view<char32_t>{__str, __len}; }
|
{ return basic_string_view<char32_t>{__str, __len}; }
|
||||||
#endif
|
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
} // namespace string_literals
|
} // namespace string_literals
|
||||||
} // namespace literals
|
} // namespace literals
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
#include <cstring> // std::memcpy, std::memcmp
|
#include <cstring> // std::memcpy, std::memcmp
|
||||||
#include <bits/stl_algobase.h> // std::min
|
#include <bits/stl_algobase.h> // std::min
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
namespace std _GLIBCXX_VISIBILITY(default)
|
namespace std _GLIBCXX_VISIBILITY(default)
|
||||||
{
|
{
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
@ -1639,4 +1638,3 @@ template class codecvt_byname<char32_t, char, mbstate_t>;
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
}
|
}
|
||||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,6 @@ namespace
|
||||||
fake_messages_w messages_w;
|
fake_messages_w messages_w;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
|
||||||
typedef char fake_codecvt_c16[sizeof(codecvt<char16_t, char, mbstate_t>)]
|
typedef char fake_codecvt_c16[sizeof(codecvt<char16_t, char, mbstate_t>)]
|
||||||
__attribute__ ((aligned(__alignof__(codecvt<char16_t, char, mbstate_t>))));
|
__attribute__ ((aligned(__alignof__(codecvt<char16_t, char, mbstate_t>))));
|
||||||
fake_codecvt_c16 codecvt_c16;
|
fake_codecvt_c16 codecvt_c16;
|
||||||
|
|
@ -209,7 +208,6 @@ namespace
|
||||||
typedef char fake_codecvt_c32[sizeof(codecvt<char32_t, char, mbstate_t>)]
|
typedef char fake_codecvt_c32[sizeof(codecvt<char32_t, char, mbstate_t>)]
|
||||||
__attribute__ ((aligned(__alignof__(codecvt<char32_t, char, mbstate_t>))));
|
__attribute__ ((aligned(__alignof__(codecvt<char32_t, char, mbstate_t>))));
|
||||||
fake_codecvt_c32 codecvt_c32;
|
fake_codecvt_c32 codecvt_c32;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Storage for "C" locale caches.
|
// Storage for "C" locale caches.
|
||||||
typedef char fake_num_cache_c[sizeof(std::__numpunct_cache<char>)]
|
typedef char fake_num_cache_c[sizeof(std::__numpunct_cache<char>)]
|
||||||
|
|
@ -329,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
&std::ctype<wchar_t>::id,
|
&std::ctype<wchar_t>::id,
|
||||||
&codecvt<wchar_t, char, mbstate_t>::id,
|
&codecvt<wchar_t, char, mbstate_t>::id,
|
||||||
#endif
|
#endif
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
#if _GLIBCXX_NUM_UNICODE_FACETS != 0
|
||||||
&codecvt<char16_t, char, mbstate_t>::id,
|
&codecvt<char16_t, char, mbstate_t>::id,
|
||||||
&codecvt<char32_t, char, mbstate_t>::id,
|
&codecvt<char32_t, char, mbstate_t>::id,
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -536,7 +534,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_M_init_facet(new (&messages_w) std::messages<wchar_t>(1));
|
_M_init_facet(new (&messages_w) std::messages<wchar_t>(1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
#ifdef _GLIBCXX_NUM_UNICODE_FACETS != 0
|
||||||
_M_init_facet(new (&codecvt_c16) codecvt<char16_t, char, mbstate_t>(1));
|
_M_init_facet(new (&codecvt_c16) codecvt<char16_t, char, mbstate_t>(1));
|
||||||
_M_init_facet(new (&codecvt_c32) codecvt<char32_t, char, mbstate_t>(1));
|
_M_init_facet(new (&codecvt_c32) codecvt<char32_t, char, mbstate_t>(1));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ const int num_facets = _GLIBCXX_NUM_FACETS + _GLIBCXX_NUM_UNICODE_FACETS
|
||||||
_M_init_facet(new std::messages<wchar_t>(__cloc, __s));
|
_M_init_facet(new std::messages<wchar_t>(__cloc, __s));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
#if _GLIBCXX_NUM_UNICODE_FACETS != 0
|
||||||
_M_init_facet(new codecvt<char16_t, char, mbstate_t>);
|
_M_init_facet(new codecvt<char16_t, char, mbstate_t>);
|
||||||
_M_init_facet(new codecvt<char32_t, char, mbstate_t>);
|
_M_init_facet(new codecvt<char32_t, char, mbstate_t>);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue