33#ifndef _GLIBCXX_STRING
34#define _GLIBCXX_STRING 1
36#pragma GCC system_header
57#define __glibcxx_want_constexpr_char_traits
58#define __glibcxx_want_constexpr_string
59#define __glibcxx_want_erase_if
60#define __glibcxx_want_nonmember_container_access
61#define __glibcxx_want_string_resize_and_overwrite
62#define __glibcxx_want_string_udls
63#define __glibcxx_want_to_string
66#if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
68namespace std _GLIBCXX_VISIBILITY(default)
70_GLIBCXX_BEGIN_NAMESPACE_VERSION
72 template<
typename _CharT,
typename _Traits =
char_traits<_CharT>>
74 polymorphic_allocator<_CharT>>;
75 using string = basic_string<char>;
76#ifdef _GLIBCXX_USE_CHAR8_T
77 using u8string = basic_string<char8_t>;
81 using wstring = basic_string<wchar_t>;
83_GLIBCXX_END_NAMESPACE_VERSION
87#ifdef __cpp_lib_erase_if
88namespace std _GLIBCXX_VISIBILITY(default)
90_GLIBCXX_BEGIN_NAMESPACE_VERSION
92 template<
typename _CharT,
typename _Traits,
typename _Alloc,
95 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
96 erase_if(basic_string<_CharT, _Traits, _Alloc>&
__cont, _Predicate __pred)
99 const auto __osz =
__cont.size();
100 const auto __end =
__cont.end();
101 auto __removed = std::__remove_if(
__cont.begin(), __end,
102 __ops::__pred_iter(std::ref(__pred)));
103 __cont.erase(__removed, __end);
104 return __osz -
__cont.size();
107 template<
typename _CharT,
typename _Traits,
typename _Alloc,
typename _Up>
109 inline typename basic_string<_CharT, _Traits, _Alloc>::size_type
110 erase(basic_string<_CharT, _Traits, _Alloc>&
__cont,
const _Up& __value)
113 const auto __osz =
__cont.size();
114 const auto __end =
__cont.end();
115 auto __removed = std::__remove_if(
__cont.begin(), __end,
116 __ops::__iter_equals_val(__value));
117 __cont.erase(__removed, __end);
118 return __osz -
__cont.size();
120_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.