55#ifndef _GLIBCXX_VECTOR
56#define _GLIBCXX_VECTOR 1
59#pragma GCC system_header
72#ifndef _GLIBCXX_EXPORT_TEMPLATE
80#define __glibcxx_want_algorithm_default_value_type
81#define __glibcxx_want_allocator_traits_is_always_equal
82#define __glibcxx_want_constexpr_vector
83#define __glibcxx_want_containers_ranges
84#define __glibcxx_want_erase_if
85#define __glibcxx_want_incomplete_container_elements
86#define __glibcxx_want_nonmember_container_access
89#if __cplusplus >= 201703L
91namespace std _GLIBCXX_VISIBILITY(default)
93_GLIBCXX_BEGIN_NAMESPACE_VERSION
95 template<
typename _Tp>
96 using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
99 namespace _GLIBCXX_STD_C::pmr {
100 template<
typename _Tp>
102 = _GLIBCXX_STD_C::vector<_Tp, std::pmr::polymorphic_allocator<_Tp>>;
105_GLIBCXX_END_NAMESPACE_VERSION
109#ifdef __cpp_lib_erase_if
110namespace std _GLIBCXX_VISIBILITY(default)
112_GLIBCXX_BEGIN_NAMESPACE_VERSION
114 template<
typename _Tp,
typename _Alloc,
typename _Predicate>
115 constexpr typename vector<_Tp, _Alloc>::size_type
118 using namespace __gnu_cxx;
119 _GLIBCXX_STD_C::vector<_Tp, _Alloc>& __ucont = __cont;
120 const auto __osz = __cont.size();
121 const auto __end = __ucont.end();
122 auto __removed = std::__remove_if(__ucont.begin(), __end,
124 if (__removed != __end)
126 __cont.erase(__niter_wrap(__cont.begin(), __removed),
128 return __osz - __cont.size();
134 template<
typename _Tp,
typename _Alloc,
135 typename _Up _GLIBCXX26_DEF_VAL_T(_Tp)>
136 constexpr typename vector<_Tp, _Alloc>::size_type
138 {
return std::erase_if(__cont, __gnu_cxx::__ops::__equal_to(__value)); }
140_GLIBCXX_END_NAMESPACE_VERSION
144#ifdef __glibcxx_format_ranges
147namespace std _GLIBCXX_VISIBILITY(default)
149_GLIBCXX_BEGIN_NAMESPACE_VERSION
152 template<__format::__
char _CharT>
153 struct formatter<_GLIBCXX_STD_C::_Bit_reference, _CharT>
157 constexpr typename basic_format_parse_context<_CharT>::iterator
158 parse(basic_format_parse_context<_CharT>& __pc)
159 {
return _M_f.template _M_parse<bool>(__pc); }
163 template<
typename _Out>
164 typename basic_format_context<_Out, _CharT>::iterator
165 format(
const _GLIBCXX_STD_C::_Bit_reference& __u,
166 basic_format_context<_Out, _CharT>& __fc)
const
167 {
return _M_f.format(
static_cast<bool>(__u), __fc); }
170 __format::__formatter_int<_CharT> _M_f;
173#if __glibcxx_print >= 202406L
175 inline constexpr bool
176 enable_nonlocking_formatter_optimization<_GLIBCXX_STD_C::_Bit_reference> =
true;
179_GLIBCXX_END_NAMESPACE_VERSION
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
ISO C++ entities toplevel namespace is std.
A standard container which offers fixed time access to individual elements in any order.