55#ifndef _GLIBCXX_VECTOR
56#define _GLIBCXX_VECTOR 1
59#pragma GCC system_header
73#ifndef _GLIBCXX_EXPORT_TEMPLATE
81#define __glibcxx_want_algorithm_default_value_type
82#define __glibcxx_want_allocator_traits_is_always_equal
83#define __glibcxx_want_constexpr_vector
84#define __glibcxx_want_containers_ranges
85#define __glibcxx_want_erase_if
86#define __glibcxx_want_incomplete_container_elements
87#define __glibcxx_want_nonmember_container_access
90#if __cplusplus >= 201703L
92namespace std _GLIBCXX_VISIBILITY(default)
94_GLIBCXX_BEGIN_NAMESPACE_VERSION
96 template<
typename _Tp>
97 using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
100 namespace _GLIBCXX_STD_C::pmr {
101 template<
typename _Tp>
103 = _GLIBCXX_STD_C::vector<_Tp, std::pmr::polymorphic_allocator<_Tp>>;
106_GLIBCXX_END_NAMESPACE_VERSION
110#ifdef __cpp_lib_erase_if
111namespace std _GLIBCXX_VISIBILITY(default)
113_GLIBCXX_BEGIN_NAMESPACE_VERSION
115 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
117 inline typename vector<_Tp, _Alloc>::size_type
120 using namespace __gnu_cxx;
121 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
122 const auto __osz = __cont.size();
123 const auto __end = __ucont.end();
124 auto __removed = std::__remove_if(__ucont.begin(), __end,
125 __ops::__pred_iter(
std::ref(__pred)));
126 if (__removed != __end)
128 __cont.erase(__niter_wrap(__cont.begin(), __removed),
130 return __osz - __cont.size();
136 template<
typename _Tp,
typename _Alloc,
137 typename _Up _GLIBCXX26_DEF_VAL_T(_Tp)>
139 inline typename vector<_Tp, _Alloc>::size_type
142 using namespace __gnu_cxx;
143 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
144 const auto __osz = __cont.size();
145 const auto __end = __ucont.end();
146 auto __removed = std::__remove_if(__ucont.begin(), __end,
147 __ops::__iter_equals_val(__value));
148 if (__removed != __end)
150 __cont.erase(__niter_wrap(__cont.begin(), __removed),
152 return __osz - __cont.size();
157_GLIBCXX_END_NAMESPACE_VERSION
161#ifdef __glibcxx_format_ranges
164namespace std _GLIBCXX_VISIBILITY(default)
166_GLIBCXX_BEGIN_NAMESPACE_VERSION
169 template<__format::__
char _CharT>
170 struct formatter<_GLIBCXX_STD_C::_Bit_reference, _CharT>
174 constexpr typename basic_format_parse_context<_CharT>::iterator
175 parse(basic_format_parse_context<_CharT>& __pc)
176 {
return _M_f.template _M_parse<bool>(__pc); }
180 template<
typename _Out>
181 typename basic_format_context<_Out, _CharT>::iterator
182 format(
const _GLIBCXX_STD_C::_Bit_reference& __u,
183 basic_format_context<_Out, _CharT>& __fc)
const
184 {
return _M_f.format(
static_cast<bool>(__u), __fc); }
187 __format::__formatter_int<_CharT> _M_f;
189_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.