33#ifndef _GLIBCXX_STRING
34#define _GLIBCXX_STRING 1
37#pragma GCC system_header
59#define __glibcxx_want_algorithm_default_value_type
60#define __glibcxx_want_allocator_traits_is_always_equal
61#define __glibcxx_want_constexpr_char_traits
62#define __glibcxx_want_constexpr_string
63#define __glibcxx_want_containers_ranges
64#define __glibcxx_want_erase_if
65#define __glibcxx_want_nonmember_container_access
66#define __glibcxx_want_string_resize_and_overwrite
67#define __glibcxx_want_string_udls
68#define __glibcxx_want_to_string
71#if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
73namespace std _GLIBCXX_VISIBILITY(default)
75_GLIBCXX_BEGIN_NAMESPACE_VERSION
77 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
79 polymorphic_allocator<_CharT>>;
80 using string = basic_string<char>;
81#ifdef _GLIBCXX_USE_CHAR8_T
82 using u8string = basic_string<char8_t>;
86 using wstring = basic_string<wchar_t>;
88_GLIBCXX_END_NAMESPACE_VERSION
92#ifdef __cpp_lib_erase_if
93namespace std _GLIBCXX_VISIBILITY(default)
95_GLIBCXX_BEGIN_NAMESPACE_VERSION
97 template<
typename _CharT,
typename _Traits,
typename _Alloc,
100 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
101 erase_if(basic_string<_CharT, _Traits, _Alloc>&
__cont, _Predicate __pred)
104 const auto __osz =
__cont.size();
105 const auto __end =
__cont.end();
106 auto __removed = std::__remove_if(
__cont.begin(), __end,
107 __ops::__pred_iter(std::ref(__pred)));
108 __cont.erase(__removed, __end);
109 return __osz -
__cont.size();
112 template<
typename _CharT,
typename _Traits,
typename _Alloc,
113 typename _Up _GLIBCXX26_DEF_VAL_T(_CharT)>
115 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
116 erase(basic_string<_CharT, _Traits, _Alloc>&
__cont,
const _Up& __value)
119 const auto __osz =
__cont.size();
120 const auto __end =
__cont.end();
121 auto __removed = std::__remove_if(
__cont.begin(), __end,
122 __ops::__iter_equals_val(__value));
123 __cont.erase(__removed, __end);
124 return __osz -
__cont.size();
126_GLIBCXX_END_NAMESPACE_VERSION
basic_string< char > string
A string of char.
basic_string< char32_t > u32string
A string of char32_t.
basic_string< char16_t > u16string
A string of char16_t.
basic_string< wchar_t > wstring
A string of wchar_t.
ISO C++ entities toplevel namespace is std.
GNU extensions for public use.
Managing sequences of characters and character-like objects.