55#ifndef _GLIBCXX_VECTOR
56#define _GLIBCXX_VECTOR 1
58#pragma GCC system_header
71#ifndef _GLIBCXX_EXPORT_TEMPLATE
79#define __glibcxx_want_allocator_traits_is_always_equal
80#define __glibcxx_want_constexpr_vector
81#define __glibcxx_want_erase_if
82#define __glibcxx_want_incomplete_container_elements
83#define __glibcxx_want_nonmember_container_access
86#if __cplusplus >= 201703L
88namespace std _GLIBCXX_VISIBILITY(default)
90_GLIBCXX_BEGIN_NAMESPACE_VERSION
92 template<
typename _Tp>
93 using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
96 namespace _GLIBCXX_STD_C::pmr {
97 template<
typename _Tp>
99 = _GLIBCXX_STD_C::vector<_Tp, std::pmr::polymorphic_allocator<_Tp>>;
102_GLIBCXX_END_NAMESPACE_VERSION
106#ifdef __cpp_lib_erase_if
107namespace std _GLIBCXX_VISIBILITY(default)
109_GLIBCXX_BEGIN_NAMESPACE_VERSION
111 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
113 inline typename vector<_Tp, _Alloc>::size_type
116 using namespace __gnu_cxx;
117 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
118 const auto __osz = __cont.size();
119 const auto __end = __ucont.end();
120 auto __removed = std::__remove_if(__ucont.begin(), __end,
121 __ops::__pred_iter(
std::ref(__pred)));
122 if (__removed != __end)
124 __cont.erase(__niter_wrap(__cont.begin(), __removed),
126 return __osz - __cont.size();
132 template<
typename _Tp,
typename _Alloc,
typename _Up>
134 inline typename vector<_Tp, _Alloc>::size_type
137 using namespace __gnu_cxx;
138 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
139 const auto __osz = __cont.size();
140 const auto __end = __ucont.end();
141 auto __removed = std::__remove_if(__ucont.begin(), __end,
142 __ops::__iter_equals_val(__value));
143 if (__removed != __end)
145 __cont.erase(__niter_wrap(__cont.begin(), __removed),
147 return __osz - __cont.size();
152_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.