33 #ifndef _GLIBCXX_STRING
34 #define _GLIBCXX_STRING 1
36 #ifdef _GLIBCXX_SYSHDR
37 #pragma GCC system_header
43 #define __glibcxx_exc_in_string 1
60 #if (_GLIBCXX_HOSTED && __cpp_exceptions && __cplusplus > 202302L \
61 && __cpp_constexpr_exceptions >= 202411L)
63 #undef __glibcxx_exc_in_string
66 #undef __glibcxx_exc_in_string
69 #define __glibcxx_want_algorithm_default_value_type
70 #define __glibcxx_want_allocator_traits_is_always_equal
71 #define __glibcxx_want_constexpr_char_traits
72 #define __glibcxx_want_constexpr_string
73 #define __glibcxx_want_containers_ranges
74 #define __glibcxx_want_erase_if
75 #define __glibcxx_want_nonmember_container_access
76 #define __glibcxx_want_string_resize_and_overwrite
77 #define __glibcxx_want_string_subview
78 #define __glibcxx_want_string_udls
79 #define __glibcxx_want_to_string
82 #if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
84 namespace std _GLIBCXX_VISIBILITY(default)
86 _GLIBCXX_BEGIN_NAMESPACE_VERSION
88 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
90 polymorphic_allocator<_CharT>>;
91 using string = basic_string<char>;
92 #ifdef _GLIBCXX_USE_CHAR8_T
93 using u8string = basic_string<char8_t>;
97 using wstring = basic_string<wchar_t>;
99 _GLIBCXX_END_NAMESPACE_VERSION
103 #ifdef __cpp_lib_erase_if // C++ >= 20 && HOSTED
104 namespace std _GLIBCXX_VISIBILITY(default)
106 _GLIBCXX_BEGIN_NAMESPACE_VERSION
108 template<
typename _CharT,
typename _Traits,
typename _Alloc,
110 constexpr
typename basic_string<_CharT, _Traits, _Alloc>::size_type
111 erase_if(basic_string<_CharT, _Traits, _Alloc>&
__cont, _Predicate __pred)
114 template<
typename _CharT,
typename _Traits,
typename _Alloc,
115 typename _Up _GLIBCXX26_DEF_VAL_T(_CharT)>
116 constexpr
typename basic_string<_CharT, _Traits, _Alloc>::size_type
117 erase(basic_string<_CharT, _Traits, _Alloc>&
__cont,
const _Up& __value)
118 {
return std::erase_if(
__cont, __gnu_cxx::__ops::__equal_to(__value)); }
120 _GLIBCXX_END_NAMESPACE_VERSION
122 #endif // __cpp_lib_erase_if