55#ifndef _GLIBCXX_VECTOR
56#define _GLIBCXX_VECTOR 1
58#pragma GCC system_header
69#ifndef _GLIBCXX_EXPORT_TEMPLATE
77#if __cplusplus >= 201703L
78namespace std _GLIBCXX_VISIBILITY(default)
80_GLIBCXX_BEGIN_NAMESPACE_VERSION
82 template<
typename _Tp>
class polymorphic_allocator;
83 template<
typename _Tp>
84 using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
87 namespace _GLIBCXX_STD_C::pmr {
88 template<
typename _Tp>
90 = _GLIBCXX_STD_C::vector<_Tp, std::pmr::polymorphic_allocator<_Tp>>;
93_GLIBCXX_END_NAMESPACE_VERSION
97#if __cplusplus > 201703L
98namespace std _GLIBCXX_VISIBILITY(default)
100_GLIBCXX_BEGIN_NAMESPACE_VERSION
102#define __cpp_lib_erase_if 202002L
104 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
106 inline typename vector<_Tp, _Alloc>::size_type
109 using namespace __gnu_cxx;
110 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
111 const auto __osz = __cont.size();
112 const auto __end = __ucont.end();
113 auto __removed = std::__remove_if(__ucont.begin(), __end,
114 __ops::__pred_iter(
std::ref(__pred)));
115 if (__removed != __end)
117 __cont.erase(__niter_wrap(__cont.begin(), __removed),
119 return __osz - __cont.size();
125 template<
typename _Tp,
typename _Alloc,
typename _Up>
127 inline typename vector<_Tp, _Alloc>::size_type
130 using namespace __gnu_cxx;
131 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
132 const auto __osz = __cont.size();
133 const auto __end = __ucont.end();
134 auto __removed = std::__remove_if(__ucont.begin(), __end,
135 __ops::__iter_equals_val(__value));
136 if (__removed != __end)
138 __cont.erase(__niter_wrap(__cont.begin(), __removed),
140 return __osz - __cont.size();
145_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.