33#ifndef _GLIBCXX_STRING
34#define _GLIBCXX_STRING 1
36#pragma GCC system_header
57#define __glibcxx_want_allocator_traits_is_always_equal
58#define __glibcxx_want_constexpr_char_traits
59#define __glibcxx_want_constexpr_string
60#define __glibcxx_want_erase_if
61#define __glibcxx_want_nonmember_container_access
62#define __glibcxx_want_string_resize_and_overwrite
63#define __glibcxx_want_string_udls
64#define __glibcxx_want_to_string
67#if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
69namespace std _GLIBCXX_VISIBILITY(default)
71_GLIBCXX_BEGIN_NAMESPACE_VERSION
73 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
75 polymorphic_allocator<_CharT>>;
76 using string = basic_string<char>;
77#ifdef _GLIBCXX_USE_CHAR8_T
78 using u8string = basic_string<char8_t>;
82 using wstring = basic_string<wchar_t>;
84_GLIBCXX_END_NAMESPACE_VERSION
88#ifdef __cpp_lib_erase_if
89namespace std _GLIBCXX_VISIBILITY(default)
91_GLIBCXX_BEGIN_NAMESPACE_VERSION
93 template<
typename _CharT,
typename _Traits,
typename _Alloc,
96 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
97 erase_if(basic_string<_CharT, _Traits, _Alloc>&
__cont, _Predicate __pred)
100 const auto __osz =
__cont.size();
101 const auto __end =
__cont.end();
102 auto __removed = std::__remove_if(
__cont.begin(), __end,
103 __ops::__pred_iter(std::ref(__pred)));
104 __cont.erase(__removed, __end);
105 return __osz -
__cont.size();
108 template<
typename _CharT,
typename _Traits,
typename _Alloc,
typename _Up>
110 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
111 erase(basic_string<_CharT, _Traits, _Alloc>&
__cont,
const _Up& __value)
114 const auto __osz =
__cont.size();
115 const auto __end =
__cont.end();
116 auto __removed = std::__remove_if(
__cont.begin(), __end,
117 __ops::__iter_equals_val(__value));
118 __cont.erase(__removed, __end);
119 return __osz -
__cont.size();
121_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.