55#ifndef _GLIBCXX_VECTOR
56#define _GLIBCXX_VECTOR 1
58#pragma GCC system_header
71#ifndef _GLIBCXX_EXPORT_TEMPLATE
79#if __cplusplus >= 201703L
81namespace std _GLIBCXX_VISIBILITY(default)
83_GLIBCXX_BEGIN_NAMESPACE_VERSION
85 template<
typename _Tp>
86 using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
89 namespace _GLIBCXX_STD_C::pmr {
90 template<
typename _Tp>
92 = _GLIBCXX_STD_C::vector<_Tp, std::pmr::polymorphic_allocator<_Tp>>;
95_GLIBCXX_END_NAMESPACE_VERSION
99#if __cplusplus > 201703L
100namespace std _GLIBCXX_VISIBILITY(default)
102_GLIBCXX_BEGIN_NAMESPACE_VERSION
104#define __cpp_lib_erase_if 202002L
106 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
108 inline typename vector<_Tp, _Alloc>::size_type
111 using namespace __gnu_cxx;
112 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
113 const auto __osz = __cont.size();
114 const auto __end = __ucont.end();
115 auto __removed = std::__remove_if(__ucont.begin(), __end,
116 __ops::__pred_iter(
std::ref(__pred)));
117 if (__removed != __end)
119 __cont.erase(__niter_wrap(__cont.begin(), __removed),
121 return __osz - __cont.size();
127 template<
typename _Tp,
typename _Alloc,
typename _Up>
129 inline typename vector<_Tp, _Alloc>::size_type
132 using namespace __gnu_cxx;
133 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
134 const auto __osz = __cont.size();
135 const auto __end = __ucont.end();
136 auto __removed = std::__remove_if(__ucont.begin(), __end,
137 __ops::__iter_equals_val(__value));
138 if (__removed != __end)
140 __cont.erase(__niter_wrap(__cont.begin(), __removed),
142 return __osz - __cont.size();
147_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
constexpr reference_wrapper< _Tp > ref(_Tp &__t) noexcept
Denotes a reference should be taken to a variable.
A standard container which offers fixed time access to individual elements in any order.