57#define _STL_BVECTOR_H 1
59#ifndef _GLIBCXX_ALWAYS_INLINE
60#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
63#if __cplusplus >= 201103L
68namespace std _GLIBCXX_VISIBILITY(default)
70_GLIBCXX_BEGIN_NAMESPACE_VERSION
72 typedef unsigned long _Bit_type;
73 enum { _S_word_bit = int(__CHAR_BIT__ *
sizeof(_Bit_type)) };
75 __attribute__((__nonnull__))
78 __fill_bvector_n(_Bit_type*,
size_t,
bool) _GLIBCXX_NOEXCEPT;
80_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
88 _Bit_reference(_Bit_type * __x, _Bit_type __y)
89 : _M_p(__x), _M_mask(__y) { }
92 _Bit_reference() _GLIBCXX_NOEXCEPT : _M_p(0), _M_mask(0) { }
94#if __cplusplus >= 201103L
95 _Bit_reference(
const _Bit_reference&) =
default;
98 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
99 operator bool() const _GLIBCXX_NOEXCEPT
100 {
return !!(*_M_p & _M_mask); }
104 operator=(
bool __x) _GLIBCXX_NOEXCEPT
113#if __cplusplus > 202002L
114 constexpr const _Bit_reference&
115 operator=(
bool __x)
const noexcept
127 operator=(
const _Bit_reference& __x) _GLIBCXX_NOEXCEPT
128 {
return *
this = bool(__x); }
130 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
132 operator==(
const _Bit_reference& __x)
const
133 {
return bool(*
this) == bool(__x); }
135 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
137 operator<(
const _Bit_reference& __x)
const
138 {
return !bool(*
this) && bool(__x); }
142 flip() _GLIBCXX_NOEXCEPT
143 { *_M_p ^= _M_mask; }
145#if __cplusplus >= 201103L
148 swap(_Bit_reference __x, _Bit_reference __y)
noexcept
157 swap(_Bit_reference __x,
bool& __y)
noexcept
166 swap(
bool& __x, _Bit_reference __y)
noexcept
176#pragma GCC diagnostic push
177#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
178 struct _Bit_iterator_base
179 :
public std::iterator<std::random_access_iterator_tag, bool>
182 unsigned int _M_offset;
184 _GLIBCXX20_CONSTEXPR _GLIBCXX_ALWAYS_INLINE
186 _M_assume_normalized()
const
188#if __has_attribute(__assume__) && !defined(__clang__)
189 unsigned int __ofst = _M_offset;
190 __attribute__ ((__assume__ (__ofst <
unsigned(_S_word_bit))));
195 _Bit_iterator_base(_Bit_type * __x,
unsigned int __y)
196 : _M_p(__x), _M_offset(__y) { }
202 _M_assume_normalized();
203 if (_M_offset++ ==
int(_S_word_bit) - 1)
214 _M_assume_normalized();
215 if (_M_offset-- == 0)
217 _M_offset = int(_S_word_bit) - 1;
224 _M_incr(ptrdiff_t __i)
226 _M_assume_normalized();
228 _M_p += __n / int(_S_word_bit);
229 __n = __n % int(_S_word_bit);
232 __n += int(_S_word_bit);
235 _M_offset =
static_cast<unsigned int>(__n);
239 friend _GLIBCXX20_CONSTEXPR
bool
240 operator==(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
242 __x._M_assume_normalized();
243 __y._M_assume_normalized();
244 return __x._M_p == __y._M_p && __x._M_offset == __y._M_offset;
247#if __cpp_lib_three_way_comparison
249 friend constexpr strong_ordering
250 operator<=>(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
253 __x._M_assume_normalized();
254 __y._M_assume_normalized();
255 if (
const auto __cmp = __x._M_p <=> __y._M_p; __cmp != 0)
257 return __x._M_offset <=> __y._M_offset;
262 operator<(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
264 __x._M_assume_normalized();
265 __y._M_assume_normalized();
266 return __x._M_p < __y._M_p
267 || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset);
272 operator!=(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
273 {
return !(__x == __y); }
277 operator>(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
278 {
return __y < __x; }
282 operator<=(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
283 {
return !(__y < __x); }
287 operator>=(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
288 {
return !(__x < __y); }
291 friend _GLIBCXX20_CONSTEXPR ptrdiff_t
292 operator-(
const _Bit_iterator_base& __x,
const _Bit_iterator_base& __y)
294 __x._M_assume_normalized();
295 __y._M_assume_normalized();
296 return (
int(_S_word_bit) * (__x._M_p - __y._M_p)
297 + __x._M_offset - __y._M_offset);
300#pragma GCC diagnostic pop
302 struct _Bit_iterator :
public _Bit_iterator_base
304 typedef _Bit_reference reference;
305#if __cplusplus > 201703L
306 typedef void pointer;
308 typedef _Bit_reference* pointer;
310 typedef _Bit_iterator iterator;
313 _Bit_iterator() : _Bit_iterator_base(0, 0) { }
316 _Bit_iterator(_Bit_type * __x,
unsigned int __y)
317 : _Bit_iterator_base(__x, __y) { }
321 _M_const_cast()
const
324 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
328 _M_assume_normalized();
329 return reference(_M_p, 1UL << _M_offset);
344 iterator __tmp = *
this;
361 iterator __tmp = *
this;
382 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
385 {
return *(*
this + __i); }
388 friend _GLIBCXX20_CONSTEXPR iterator
391 iterator __tmp = __x;
397 friend _GLIBCXX20_CONSTEXPR iterator
399 {
return __x + __n; }
402 friend _GLIBCXX20_CONSTEXPR iterator
405 iterator __tmp = __x;
411 struct _Bit_const_iterator :
public _Bit_iterator_base
413 typedef bool reference;
414 typedef bool const_reference;
415#if __cplusplus > 201703L
416 typedef void pointer;
418 typedef const bool* pointer;
420 typedef _Bit_const_iterator const_iterator;
423 _Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
426 _Bit_const_iterator(_Bit_type * __x,
unsigned int __y)
427 : _Bit_iterator_base(__x, __y) { }
430 _Bit_const_iterator(
const _Bit_iterator& __x)
431 : _Bit_iterator_base(__x._M_p, __x._M_offset) { }
435 _M_const_cast()
const
436 {
return _Bit_iterator(_M_p, _M_offset); }
438 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
442 _M_assume_normalized();
443 return _Bit_reference(_M_p, 1UL << _M_offset);
458 const_iterator __tmp = *
this;
475 const_iterator __tmp = *
this;
496 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
499 {
return *(*
this + __i); }
502 friend _GLIBCXX20_CONSTEXPR const_iterator
505 const_iterator __tmp = __x;
511 friend _GLIBCXX20_CONSTEXPR const_iterator
514 const_iterator __tmp = __x;
520 friend _GLIBCXX20_CONSTEXPR const_iterator
522 {
return __x + __n; }
525 template<
typename _Alloc>
529 rebind<_Bit_type>::other _Bit_alloc_type;
532 typedef typename _Bit_alloc_traits::pointer _Bit_pointer;
534 struct _Bvector_impl_data
536#if !_GLIBCXX_INLINE_VERSION
537 _Bit_iterator _M_start;
544 void operator=(_Bit_iterator __it) { _M_p = __it._M_p; }
547 _Bit_iterator _M_finish;
548 _Bit_pointer _M_end_of_storage;
551 _Bvector_impl_data() _GLIBCXX_NOEXCEPT
552 : _M_start(), _M_finish(), _M_end_of_storage()
555#if __cplusplus >= 201103L
556 _Bvector_impl_data(
const _Bvector_impl_data&) =
default;
559 operator=(
const _Bvector_impl_data&) =
default;
562 _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept
563 : _Bvector_impl_data(__x)
568 _M_move_data(_Bvector_impl_data&& __x)
noexcept
577 _M_reset() _GLIBCXX_NOEXCEPT
578 { *
this = _Bvector_impl_data(); }
582 _M_swap_data(_Bvector_impl_data& __x) _GLIBCXX_NOEXCEPT
586 std::swap(*
this, __x);
591 :
public _Bit_alloc_type,
public _Bvector_impl_data
594 _Bvector_impl() _GLIBCXX_NOEXCEPT_IF(
595 is_nothrow_default_constructible<_Bit_alloc_type>::value)
596#if __cpp_concepts && __glibcxx_type_trait_variable_templates
597 requires is_default_constructible_v<_Bit_alloc_type>
603 _Bvector_impl(
const _Bit_alloc_type& __a) _GLIBCXX_NOEXCEPT
604 : _Bit_alloc_type(__a)
607#if __cplusplus >= 201103L
611 _Bvector_impl(_Bvector_impl&& __x) noexcept
616 _Bvector_impl(_Bit_alloc_type&& __a, _Bvector_impl&& __x) noexcept
623 _M_end_addr() const _GLIBCXX_NOEXCEPT
625 if (this->_M_end_of_storage)
632 typedef _Alloc allocator_type;
636 _M_get_Bit_allocator() _GLIBCXX_NOEXCEPT
637 {
return this->_M_impl; }
640 const _Bit_alloc_type&
641 _M_get_Bit_allocator() const _GLIBCXX_NOEXCEPT
642 {
return this->_M_impl; }
646 get_allocator() const _GLIBCXX_NOEXCEPT
647 {
return allocator_type(_M_get_Bit_allocator()); }
649#if __cplusplus >= 201103L
650 _Bvector_base() =
default;
656 _Bvector_base(
const allocator_type& __a)
657 : _M_impl(_Bit_alloc_type(__a)) { }
659#if __cplusplus >= 201103L
660 _Bvector_base(_Bvector_base&&) =
default;
663 _Bvector_base(_Bvector_base&& __x,
const allocator_type& __a) noexcept
664 : _M_impl(_Bit_alloc_type(__a),
std::move(__x._M_impl))
670 { this->_M_deallocate(); }
673 _Bvector_impl _M_impl;
677 _M_allocate(
size_t __n)
680#if __cpp_lib_is_constant_evaluated && __cpp_constexpr_dynamic_alloc
684 for (
size_t __i = 0; __i < __n; ++__i)
695 if (_M_impl._M_start._M_p)
697 const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p;
699 _M_impl._M_end_of_storage - __n,
705#if __cplusplus >= 201103L
708 _M_move_data(_Bvector_base&& __x)
noexcept
709 { _M_impl._M_move_data(
std::move(__x._M_impl)); }
715 {
return (__n +
int(_S_word_bit) - 1) / int(_S_word_bit); }
739 template<
typename _Alloc>
740 class vector<bool, _Alloc> :
protected _Bvector_base<_Alloc>
746#if __cplusplus >= 201103L
751 typedef bool value_type;
752 typedef size_t size_type;
754 typedef _Bit_reference reference;
755 typedef bool const_reference;
756 typedef _Bit_reference* pointer;
757 typedef const bool* const_pointer;
758 typedef _Bit_iterator iterator;
759 typedef _Bit_const_iterator const_iterator;
762 typedef _Alloc allocator_type;
767 {
return _Base::get_allocator(); }
770 using _Base::_M_allocate;
771 using _Base::_M_deallocate;
772 using _Base::_S_nword;
773 using _Base::_M_get_Bit_allocator;
776#if __cplusplus >= 201103L
784 vector(
const allocator_type& __a)
787#if __cplusplus >= 201103L
790 vector(size_type __n,
const allocator_type& __a = allocator_type())
795 vector(size_type __n,
const bool& __value,
796 const allocator_type& __a = allocator_type())
799 vector(size_type __n,
const bool& __value =
bool(),
800 const allocator_type& __a = allocator_type())
805 _M_initialize_value(__value);
810 : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator()))
813 _M_initialize(__x.
size());
817#if __cplusplus >= 201103L
834 _M_initialize(__x.
size());
843 noexcept(_Bit_alloc_traits::_S_always_equal())
852 _M_initialize(__x.
size());
858 const allocator_type& __a = allocator_type())
861 _M_initialize_range(
__l.begin(),
__l.end(),
866#if __cplusplus >= 201103L
871 const allocator_type& __a = allocator_type())
874 _M_initialize_range(__first, __last,
878 template<
typename _InputIterator>
880 const allocator_type& __a = allocator_type())
884 typedef typename std::__is_integer<_InputIterator>::__type
_Integral;
885 _M_initialize_dispatch(__first, __last,
_Integral());
898#if __cplusplus >= 201103L
899 if (_Bit_alloc_traits::_S_propagate_on_copy_assign())
901 if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator())
903 this->_M_deallocate();
905 __x._M_get_Bit_allocator());
906 _M_initialize(__x.
size());
910 __x._M_get_Bit_allocator());
915 this->_M_deallocate();
916 _M_initialize(__x.
size());
918 this->_M_impl._M_finish = _M_copy_aligned(__x.
begin(), __x.
end(),
923#if __cplusplus >= 201103L
928 if (_Bit_alloc_traits::_S_propagate_on_move_assign()
929 || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator())
931 this->_M_deallocate();
934 __x._M_get_Bit_allocator());
940 this->_M_deallocate();
941 _M_initialize(__x.
size());
943 this->_M_impl._M_finish = _M_copy_aligned(__x.
begin(), __x.
end(),
965 assign(size_type __n,
const bool& __x)
966 { _M_fill_assign(__n, __x); }
968#if __cplusplus >= 201103L
976 template<
typename _InputIterator>
981 typedef typename std::__is_integer<_InputIterator>::__type
_Integral;
982 _M_assign_dispatch(__first, __last,
_Integral());
986#if __cplusplus >= 201103L
996 {
return iterator(this->_M_impl._M_start._M_p, 0); }
1001 {
return const_iterator(this->_M_impl._M_start._M_p, 0); }
1006 {
return this->_M_impl._M_finish; }
1011 {
return this->_M_impl._M_finish; }
1033#if __cplusplus >= 201103L
1037 {
return const_iterator(this->_M_impl._M_start._M_p, 0); }
1041 cend()
const noexcept
1042 {
return this->_M_impl._M_finish; }
1051 crend()
const noexcept
1058 {
return size_type(
end() -
begin()); }
1065 __gnu_cxx::__numeric_traits<difference_type>::__max
1066 - int(_S_word_bit) + 1;
1068 = _Bit_alloc_traits::max_size(_M_get_Bit_allocator());
1076 {
return size_type(const_iterator(this->_M_impl._M_end_addr(), 0)
1087 {
return begin()[__n]; }
1092 {
return begin()[__n]; }
1099 if (__n >= this->
size())
1100 __throw_out_of_range_fmt(__N(
"vector<bool>::_M_range_check: __n "
1101 "(which is %zu) >= this->size() "
1112 return (*
this)[__n];
1117 at(size_type __n)
const
1120 return (*
this)[__n];
1128 __throw_length_error(__N(
"vector::reserve"));
1136 {
return *
begin(); }
1141 {
return *
begin(); }
1146 {
return *(
end() - 1); }
1151 {
return *(
end() - 1); }
1157 if (this->_M_impl._M_finish._M_p !=
this->_M_impl._M_end_addr())
1158 *this->_M_impl._M_finish++ = __x;
1160 _M_insert_aux(
end(), __x);
1167#if __cplusplus >= 201103L
1168 __glibcxx_assert(_Bit_alloc_traits::propagate_on_container_swap::value
1169 || _M_get_Bit_allocator() == __x._M_get_Bit_allocator());
1171 this->_M_impl._M_swap_data(__x._M_impl);
1172 _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(),
1173 __x._M_get_Bit_allocator());
1188#if __cplusplus >= 201103L
1195 if (this->_M_impl._M_finish._M_p !=
this->_M_impl._M_end_addr()
1197 *this->_M_impl._M_finish++ = __x;
1199 _M_insert_aux(
__position._M_const_cast(), __x);
1200 return begin() + __n;
1203#if _GLIBCXX_USE_DEPRECATED
1204 _GLIBCXX_DEPRECATED_SUGGEST(
"insert(position, false)")
1207 {
return this->
insert(__position._M_const_cast(),
false); }
1210#if __cplusplus >= 201103L
1222 return begin() + __offset;
1225 template<
typename _InputIterator>
1231 typedef typename std::__is_integer<_InputIterator>::__type
_Integral;
1236#if __cplusplus >= 201103L
1242 _M_fill_insert(
__position._M_const_cast(), __n, __x);
1243 return begin() + __offset;
1251#if __cplusplus >= 201103L
1261 { --this->_M_impl._M_finish; }
1265#if __cplusplus >= 201103L
1270 {
return _M_erase(
__position._M_const_cast()); }
1274#if __cplusplus >= 201103L
1275 erase(const_iterator __first, const_iterator __last)
1277 erase(iterator __first, iterator __last)
1279 {
return _M_erase(__first._M_const_cast(), __last._M_const_cast()); }
1291#if __cplusplus >= 201103L
1295 { _M_shrink_to_fit(); }
1302 _Bit_type *
const __end = this->_M_impl._M_end_addr();
1303 for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p)
1310 { _M_erase_at_end(
begin()); }
1312#if __cplusplus >= 201103L
1313 template<
typename...
_Args>
1314#if __cplusplus > 201402L
1323#if __cplusplus > 201402L
1328 template<
typename...
_Args>
1339 _M_copy_aligned(const_iterator __first, const_iterator __last,
1342 _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p);
1343 return std::copy(const_iterator(__last._M_p, 0), __last,
1349 _M_initialize(size_type __n)
1354 this->_M_impl._M_end_of_storage = __q + _S_nword(__n);
1356 this->_M_impl._M_start =
__start;
1365 if (_Bit_type* __p = this->_M_impl._M_start._M_p)
1366 __fill_bvector_n(__p, this->_M_impl._M_end_addr() - __p, __x);
1371 _M_reallocate(size_type __n);
1373#if __cplusplus >= 201103L
1379#if __cplusplus < 201103L
1382 template<
typename _Integer>
1386 _M_initialize(
static_cast<size_type
>(__n));
1387 _M_initialize_value(__x);
1390 template<
typename _InputIterator>
1394 { _M_initialize_range(__first, __last,
1398 template<
typename _InputIterator>
1404 for (; __first != __last; ++__first)
1408 template<
typename _ForwardIterator>
1416 std::copy(__first, __last,
begin());
1419#if __cplusplus < 201103L
1422 template<
typename _Integer>
1425 { _M_fill_assign(__n, __val); }
1427 template<
class _InputIterator>
1436 _M_fill_assign(
size_t __n,
bool __x)
1440 _M_initialize_value(__x);
1445 _M_erase_at_end(
begin() + __n);
1446 _M_initialize_value(__x);
1450 template<
typename _InputIterator>
1459 if (__first == __last)
1460 _M_erase_at_end(
__cur);
1465 template<
typename _ForwardIterator>
1473 _M_erase_at_end(std::copy(__first, __last,
begin()));
1483#if __cplusplus < 201103L
1486 template<
typename _Integer>
1490 { _M_fill_insert(
__pos, __n, __x); }
1492 template<
typename _InputIterator>
1494 _M_insert_dispatch(iterator
__pos,
1497 { _M_insert_range(
__pos, __first, __last,
1503 _M_fill_insert(iterator
__position, size_type __n,
bool __x);
1505 template<
typename _InputIterator>
1511 for (; __first != __last; ++__first)
1518 template<
typename _ForwardIterator>
1526 _M_insert_aux(iterator
__position,
bool __x);
1530 _M_check_len(size_type __n,
const char*
__s)
const
1533 __throw_length_error(__N(
__s));
1541 _M_erase_at_end(iterator
__pos)
1542 { this->_M_impl._M_finish =
__pos; }
1546 _M_erase(iterator
__pos);
1550 _M_erase(iterator __first, iterator __last);
1558#if __cplusplus >= 201103L
1559 void data() =
delete;
1565_GLIBCXX_END_NAMESPACE_CONTAINER
1570 __fill_bvector(_Bit_type*
__v,
unsigned int __first,
unsigned int __last,
1573 const _Bit_type
__fmask = ~0
ul << __first;
1574 const _Bit_type
__lmask = ~0
ul >> (_S_word_bit - __last);
1584 __attribute__((__nonnull__))
1585 _GLIBCXX20_CONSTEXPR
1587 __fill_bvector_n(_Bit_type* __p,
size_t __n,
bool __x) _GLIBCXX_NOEXCEPT
1589#if __cpp_lib_is_constant_evaluated
1592 for (
size_t __i = 0; __i < __n; ++__i)
1593 __p[__i] = __x ? ~0ul : 0ul;
1597 __builtin_memset(__p, __x ? ~0 : 0, __n * sizeof(_Bit_type));
1601 _GLIBCXX20_CONSTEXPR
1603 __fill_a1(_GLIBCXX_STD_C::_Bit_iterator __first,
1604 _GLIBCXX_STD_C::_Bit_iterator __last,
const bool& __x)
1606 if (__first._M_p != __last._M_p)
1608 _Bit_type* __first_p = __first._M_p;
1609 if (__first._M_offset != 0)
1610 __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x);
1612 __fill_bvector_n(__first_p, __last._M_p - __first_p, __x);
1614 if (__last._M_offset != 0)
1615 __fill_bvector(__last._M_p, 0, __last._M_offset, __x);
1617 else if (__first._M_offset != __last._M_offset)
1618 __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x);
1621#if __cplusplus >= 201103L
1624 template<
typename _Alloc>
1626 :
public __hash_base<size_t, _GLIBCXX_STD_C::vector<bool, _Alloc>>
1629 operator()(
const _GLIBCXX_STD_C::vector<bool, _Alloc>&)
const noexcept;
1633_GLIBCXX_END_NAMESPACE_VERSION
constexpr bool operator<=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr bool operator>=(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr bool operator<(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr bool operator>(const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
constexpr complex< _Tp > operator-(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x minus y.
constexpr complex< _Tp > operator+(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x plus y.
constexpr _Tp * to_address(_Tp *__ptr) noexcept
Obtain address referenced by a pointer to an object.
__bool_constant< true > true_type
The type used as a compile-time boolean with true value.
__bool_constant< false > false_type
The type used as a compile-time boolean with false value.
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
constexpr const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
ISO C++ entities toplevel namespace is std.
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
constexpr void advance(_InputIterator &__i, _Distance __n)
A generalization of pointer arithmetic.
Primary class template hash.
typename __detected_or_t< is_empty< _Alloc >, __equal, _Alloc >::type is_always_equal
Whether all instances of the allocator type compare equal.
Forward iterators support a superset of input iterator operations.
Random-access iterators support a superset of bidirectional iterator operations.
ptrdiff_t difference_type
Distance between iterators is represented as this type.
A standard container which offers fixed time access to individual elements in any order.
constexpr iterator insert(const_iterator __position, const value_type &__x)
Inserts given value into vector before specified iterator.
constexpr void push_back(const value_type &__x)
Add data to the end of the vector.
constexpr reverse_iterator rbegin() noexcept
constexpr iterator end() noexcept
vector()=default
Creates a vector with no elements.
constexpr iterator emplace(const_iterator __position, _Args &&... __args)
Inserts an object in vector before specified iterator.
constexpr iterator begin() noexcept
constexpr size_type capacity() const noexcept
constexpr ~vector() noexcept
constexpr void assign(size_type __n, const value_type &__val)
Assigns a given value to a vector.
constexpr _Tp * data() noexcept
constexpr vector & operator=(const vector &__x)
Vector assignment operator.
constexpr void pop_back() noexcept
Removes last element.
constexpr void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
constexpr reference at(size_type __n)
Provides access to the data contained in the vector.
constexpr void resize(size_type __new_size)
Resizes the vector to the specified number of elements.
constexpr void _M_range_check(size_type __n) const
Safety check used only from at().
constexpr reference front() noexcept
constexpr iterator erase(const_iterator __position)
Remove element at given position.
constexpr bool empty() const noexcept
constexpr reverse_iterator rend() noexcept
constexpr const_reverse_iterator crbegin() const noexcept
constexpr const_iterator cbegin() const noexcept
constexpr void clear() noexcept
constexpr allocator_type get_allocator() const noexcept
Get a copy of the memory allocation object.
constexpr size_type size() const noexcept
constexpr reference back() noexcept
constexpr const_reverse_iterator crend() const noexcept
constexpr const_iterator cend() const noexcept
constexpr reference operator[](size_type __n) noexcept
Subscript access to the data contained in the vector.
constexpr void shrink_to_fit()
constexpr size_type max_size() const noexcept
Uniform interface to C++98 and C++11 allocators.
static constexpr pointer allocate(_Alloc &__a, size_type __n)
Allocate memory.
static constexpr void deallocate(_Alloc &__a, pointer __p, size_type __n)
Deallocate memory.