57 #define _STL_VECTOR_H 1 62 #if __cplusplus >= 201103L 66 namespace std _GLIBCXX_VISIBILITY(default)
68 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
71 template<
typename _Tp,
typename _Alloc>
75 rebind<_Tp>::other _Tp_alloc_type;
76 typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer
80 :
public _Tp_alloc_type
84 pointer _M_end_of_storage;
87 : _Tp_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage()
90 _Vector_impl(_Tp_alloc_type
const& __a) _GLIBCXX_NOEXCEPT
91 : _Tp_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage()
94 #if __cplusplus >= 201103L 95 _Vector_impl(_Tp_alloc_type&& __a) noexcept
96 : _Tp_alloc_type(std::move(__a)),
97 _M_start(), _M_finish(), _M_end_of_storage()
101 void _M_swap_data(_Vector_impl& __x) _GLIBCXX_NOEXCEPT
103 std::swap(_M_start, __x._M_start);
104 std::swap(_M_finish, __x._M_finish);
105 std::swap(_M_end_of_storage, __x._M_end_of_storage);
110 typedef _Alloc allocator_type;
113 _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT
114 {
return *
static_cast<_Tp_alloc_type*
>(&this->_M_impl); }
116 const _Tp_alloc_type&
117 _M_get_Tp_allocator()
const _GLIBCXX_NOEXCEPT
118 {
return *
static_cast<const _Tp_alloc_type*
>(&this->_M_impl); }
121 get_allocator()
const _GLIBCXX_NOEXCEPT
122 {
return allocator_type(_M_get_Tp_allocator()); }
127 _Vector_base(
const allocator_type& __a) _GLIBCXX_NOEXCEPT
132 { _M_create_storage(__n); }
136 { _M_create_storage(__n); }
138 #if __cplusplus >= 201103L 140 : _M_impl(std::move(__a)) { }
143 : _M_impl(std::move(__x._M_get_Tp_allocator()))
144 { this->_M_impl._M_swap_data(__x._M_impl); }
149 if (__x.get_allocator() == __a)
150 this->_M_impl._M_swap_data(__x._M_impl);
153 size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start;
154 _M_create_storage(__n);
160 { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
161 - this->_M_impl._M_start); }
164 _Vector_impl _M_impl;
167 _M_allocate(
size_t __n)
170 return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer();
174 _M_deallocate(pointer __p,
size_t __n)
178 _Tr::deallocate(_M_impl, __p, __n);
183 _M_create_storage(
size_t __n)
185 this->_M_impl._M_start = this->_M_allocate(__n);
186 this->_M_impl._M_finish = this->_M_impl._M_start;
187 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
213 template<
typename _Tp,
typename _Alloc = std::allocator<_Tp> >
217 typedef typename _Alloc::value_type _Alloc_value_type;
218 #if __cplusplus < 201103L 219 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
221 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
224 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
228 typedef _Tp value_type;
229 typedef typename _Base::pointer pointer;
230 typedef typename _Alloc_traits::const_pointer const_pointer;
231 typedef typename _Alloc_traits::reference reference;
232 typedef typename _Alloc_traits::const_reference const_reference;
233 typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
234 typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
238 typedef size_t size_type;
239 typedef ptrdiff_t difference_type;
240 typedef _Alloc allocator_type;
243 using _Base::_M_allocate;
244 using _Base::_M_deallocate;
245 using _Base::_M_impl;
246 using _Base::_M_get_Tp_allocator;
256 #if __cplusplus >= 201103L 257 noexcept(is_nothrow_default_constructible<_Alloc>::value)
266 vector(
const allocator_type& __a) _GLIBCXX_NOEXCEPT
269 #if __cplusplus >= 201103L 279 vector(size_type __n,
const allocator_type& __a = allocator_type())
281 { _M_default_initialize(__n); }
291 vector(size_type __n,
const value_type& __value,
292 const allocator_type& __a = allocator_type())
294 { _M_fill_initialize(__n, __value); }
305 vector(size_type __n,
const value_type& __value = value_type(),
306 const allocator_type& __a = allocator_type())
308 { _M_fill_initialize(__n, __value); }
322 _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()))
323 { this->_M_impl._M_finish =
324 std::__uninitialized_copy_a(__x.
begin(), __x.
end(),
325 this->_M_impl._M_start,
326 _M_get_Tp_allocator());
329 #if __cplusplus >= 201103L 338 : _Base(
std::move(__x)) { }
342 : _Base(__x.size(), __a)
343 { this->_M_impl._M_finish =
344 std::__uninitialized_copy_a(__x.
begin(), __x.
end(),
345 this->_M_impl._M_start,
346 _M_get_Tp_allocator());
351 noexcept(_Alloc_traits::_S_always_equal())
352 : _Base(
std::move(__rv), __m)
354 if (__rv.get_allocator() != __m)
356 this->_M_impl._M_finish =
357 std::__uninitialized_move_a(__rv.begin(), __rv.end(),
358 this->_M_impl._M_start,
359 _M_get_Tp_allocator());
376 const allocator_type& __a = allocator_type())
379 _M_range_initialize(__l.begin(), __l.end(),
400 #if __cplusplus >= 201103L 401 template<
typename _InputIterator,
402 typename = std::_RequireInputIter<_InputIterator>>
403 vector(_InputIterator __first, _InputIterator __last,
404 const allocator_type& __a = allocator_type())
406 { _M_initialize_dispatch(__first, __last, __false_type()); }
408 template<
typename _InputIterator>
409 vector(_InputIterator __first, _InputIterator __last,
410 const allocator_type& __a = allocator_type())
414 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
415 _M_initialize_dispatch(__first, __last, _Integral());
426 {
std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
427 _M_get_Tp_allocator()); }
438 operator=(
const vector& __x);
440 #if __cplusplus >= 201103L 452 constexpr
bool __move_storage =
453 _Alloc_traits::_S_propagate_on_move_assign()
454 || _Alloc_traits::_S_always_equal();
473 this->assign(__l.begin(), __l.end());
489 assign(size_type __n,
const value_type& __val)
490 { _M_fill_assign(__n, __val); }
504 #if __cplusplus >= 201103L 505 template<
typename _InputIterator,
506 typename = std::_RequireInputIter<_InputIterator>>
508 assign(_InputIterator __first, _InputIterator __last)
509 { _M_assign_dispatch(__first, __last, __false_type()); }
511 template<
typename _InputIterator>
513 assign(_InputIterator __first, _InputIterator __last)
516 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
517 _M_assign_dispatch(__first, __last, _Integral());
521 #if __cplusplus >= 201103L 535 { this->assign(__l.begin(), __l.end()); }
539 using _Base::get_allocator;
549 {
return iterator(this->_M_impl._M_start); }
558 {
return const_iterator(this->_M_impl._M_start); }
567 {
return iterator(this->_M_impl._M_finish); }
575 end() const _GLIBCXX_NOEXCEPT
576 {
return const_iterator(this->_M_impl._M_finish); }
585 {
return reverse_iterator(
end()); }
592 const_reverse_iterator
594 {
return const_reverse_iterator(
end()); }
603 {
return reverse_iterator(
begin()); }
610 const_reverse_iterator
612 {
return const_reverse_iterator(
begin()); }
614 #if __cplusplus >= 201103L 622 {
return const_iterator(this->_M_impl._M_start); }
631 {
return const_iterator(this->_M_impl._M_finish); }
638 const_reverse_iterator
640 {
return const_reverse_iterator(
end()); }
647 const_reverse_iterator
649 {
return const_reverse_iterator(
begin()); }
656 {
return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
661 {
return _Alloc_traits::max_size(_M_get_Tp_allocator()); }
663 #if __cplusplus >= 201103L 676 if (__new_size > size())
677 _M_default_append(__new_size - size());
678 else if (__new_size < size())
679 _M_erase_at_end(this->_M_impl._M_start + __new_size);
694 resize(size_type __new_size,
const value_type& __x)
696 if (__new_size > size())
697 insert(
end(), __new_size - size(), __x);
698 else if (__new_size < size())
699 _M_erase_at_end(this->_M_impl._M_start + __new_size);
714 resize(size_type __new_size, value_type __x = value_type())
716 if (__new_size > size())
717 insert(
end(), __new_size - size(), __x);
718 else if (__new_size < size())
719 _M_erase_at_end(this->_M_impl._M_start + __new_size);
723 #if __cplusplus >= 201103L 727 { _M_shrink_to_fit(); }
736 {
return size_type(this->_M_impl._M_end_of_storage
737 - this->_M_impl._M_start); }
765 reserve(size_type __n);
781 {
return *(this->_M_impl._M_start + __n); }
796 {
return *(this->_M_impl._M_start + __n); }
803 if (__n >= this->size())
804 __throw_out_of_range_fmt(__N(
"vector::_M_range_check: __n " 805 "(which is %zu) >= this->size() " 841 at(size_type __n)
const 869 {
return *(
end() - 1); }
877 {
return *(
end() - 1); }
886 #if __cplusplus >= 201103L 892 {
return _M_data_ptr(this->_M_impl._M_start); }
894 #if __cplusplus >= 201103L 899 data()
const _GLIBCXX_NOEXCEPT
900 {
return _M_data_ptr(this->_M_impl._M_start); }
916 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
918 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
920 ++this->_M_impl._M_finish;
923 #if __cplusplus >= 201103L 924 _M_emplace_back_aux(__x);
926 _M_insert_aux(
end(), __x);
930 #if __cplusplus >= 201103L 932 push_back(value_type&& __x)
933 { emplace_back(std::move(__x)); }
935 template<
typename... _Args>
937 emplace_back(_Args&&... __args);
952 --this->_M_impl._M_finish;
953 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
956 #if __cplusplus >= 201103L 969 template<
typename... _Args>
971 emplace(const_iterator __position, _Args&&... __args);
985 insert(const_iterator __position,
const value_type& __x);
999 insert(iterator __position,
const value_type& __x);
1002 #if __cplusplus >= 201103L 1015 insert(const_iterator __position, value_type&& __x)
1016 {
return emplace(__position, std::move(__x)); }
1033 {
return this->insert(__position, __l.begin(), __l.end()); }
1036 #if __cplusplus >= 201103L 1052 insert(const_iterator __position, size_type __n,
const value_type& __x)
1054 difference_type __offset = __position -
cbegin();
1055 _M_fill_insert(
begin() + __offset, __n, __x);
1056 return begin() + __offset;
1073 insert(iterator __position, size_type __n,
const value_type& __x)
1074 { _M_fill_insert(__position, __n, __x); }
1077 #if __cplusplus >= 201103L 1093 template<
typename _InputIterator,
1094 typename = std::_RequireInputIter<_InputIterator>>
1096 insert(const_iterator __position, _InputIterator __first,
1097 _InputIterator __last)
1099 difference_type __offset = __position -
cbegin();
1100 _M_insert_dispatch(
begin() + __offset,
1101 __first, __last, __false_type());
1102 return begin() + __offset;
1119 template<
typename _InputIterator>
1121 insert(iterator __position, _InputIterator __first,
1122 _InputIterator __last)
1125 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
1126 _M_insert_dispatch(__position, __first, __last, _Integral());
1146 #if __cplusplus >= 201103L 1148 {
return _M_erase(
begin() + (__position -
cbegin())); }
1150 erase(iterator __position)
1151 {
return _M_erase(__position); }
1173 #if __cplusplus >= 201103L 1174 erase(const_iterator __first, const_iterator __last)
1176 const auto __beg =
begin();
1177 const auto __cbeg =
cbegin();
1178 return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg));
1181 erase(iterator __first, iterator __last)
1182 {
return _M_erase(__first, __last); }
1197 this->_M_impl._M_swap_data(__x._M_impl);
1198 _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(),
1199 __x._M_get_Tp_allocator());
1210 { _M_erase_at_end(this->_M_impl._M_start); }
1217 template<
typename _ForwardIterator>
1220 _ForwardIterator __first, _ForwardIterator __last)
1222 pointer __result = this->_M_allocate(__n);
1225 std::__uninitialized_copy_a(__first, __last, __result,
1226 _M_get_Tp_allocator());
1231 _M_deallocate(__result, __n);
1232 __throw_exception_again;
1243 template<
typename _Integer>
1245 _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
1247 this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n));
1248 this->_M_impl._M_end_of_storage =
1249 this->_M_impl._M_start +
static_cast<size_type
>(__n);
1250 _M_fill_initialize(static_cast<size_type>(__n), __value);
1254 template<
typename _InputIterator>
1256 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
1259 typedef typename std::iterator_traits<_InputIterator>::
1260 iterator_category _IterCategory;
1261 _M_range_initialize(__first, __last, _IterCategory());
1265 template<
typename _InputIterator>
1267 _M_range_initialize(_InputIterator __first,
1270 for (; __first != __last; ++__first)
1271 #
if __cplusplus >= 201103L
1272 emplace_back(*__first);
1274 push_back(*__first);
1279 template<
typename _ForwardIterator>
1281 _M_range_initialize(_ForwardIterator __first,
1285 this->_M_impl._M_start = this->_M_allocate(__n);
1286 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
1287 this->_M_impl._M_finish =
1288 std::__uninitialized_copy_a(__first, __last,
1289 this->_M_impl._M_start,
1290 _M_get_Tp_allocator());
1296 _M_fill_initialize(size_type __n,
const value_type& __value)
1298 this->_M_impl._M_finish =
1299 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
1300 _M_get_Tp_allocator());
1303 #if __cplusplus >= 201103L 1306 _M_default_initialize(size_type __n)
1308 this->_M_impl._M_finish =
1309 std::__uninitialized_default_n_a(this->_M_impl._M_start, __n,
1310 _M_get_Tp_allocator());
1321 template<
typename _Integer>
1323 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
1324 { _M_fill_assign(__n, __val); }
1327 template<
typename _InputIterator>
1329 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
1332 typedef typename std::iterator_traits<_InputIterator>::
1333 iterator_category _IterCategory;
1334 _M_assign_aux(__first, __last, _IterCategory());
1338 template<
typename _InputIterator>
1340 _M_assign_aux(_InputIterator __first, _InputIterator __last,
1344 template<
typename _ForwardIterator>
1346 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
1352 _M_fill_assign(size_type __n,
const value_type& __val);
1361 template<
typename _Integer>
1363 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
1365 { _M_fill_insert(__pos, __n, __val); }
1368 template<
typename _InputIterator>
1370 _M_insert_dispatch(iterator __pos, _InputIterator __first,
1371 _InputIterator __last, __false_type)
1373 typedef typename std::iterator_traits<_InputIterator>::
1374 iterator_category _IterCategory;
1375 _M_range_insert(__pos, __first, __last, _IterCategory());
1379 template<
typename _InputIterator>
1381 _M_range_insert(iterator __pos, _InputIterator __first,
1385 template<
typename _ForwardIterator>
1387 _M_range_insert(iterator __pos, _ForwardIterator __first,
1393 _M_fill_insert(iterator __pos, size_type __n,
const value_type& __x);
1395 #if __cplusplus >= 201103L 1398 _M_default_append(size_type __n);
1405 #if __cplusplus < 201103L 1407 _M_insert_aux(iterator __position,
const value_type& __x);
1409 template<
typename... _Args>
1411 _M_insert_aux(iterator __position, _Args&&... __args);
1413 template<
typename... _Args>
1415 _M_emplace_back_aux(_Args&&... __args);
1420 _M_check_len(size_type __n,
const char* __s)
const 1422 if (max_size() - size() < __n)
1423 __throw_length_error(__N(__s));
1425 const size_type __len = size() +
std::max(size(), __n);
1426 return (__len < size() || __len > max_size()) ? max_size() : __len;
1434 _M_erase_at_end(pointer __pos) _GLIBCXX_NOEXCEPT
1436 std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator());
1437 this->_M_impl._M_finish = __pos;
1441 _M_erase(iterator __position);
1444 _M_erase(iterator __first, iterator __last);
1446 #if __cplusplus >= 201103L 1454 vector __tmp(get_allocator());
1455 this->_M_impl._M_swap_data(__tmp._M_impl);
1456 this->_M_impl._M_swap_data(__x._M_impl);
1457 std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator());
1465 if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator())
1471 this->assign(std::__make_move_if_noexcept_iterator(__x.begin()),
1472 std::__make_move_if_noexcept_iterator(__x.end()));
1478 #if __cplusplus >= 201103L 1479 template<
typename _Up>
1481 _M_data_ptr(_Up* __ptr)
const 1484 template<
typename _Ptr>
1486 _M_data_ptr(_Ptr __ptr)
const 1489 template<
typename _Ptr>
1491 _M_data_ptr(_Ptr __ptr)
const 1507 template<
typename _Tp,
typename _Alloc>
1524 template<
typename _Tp,
typename _Alloc>
1528 __y.begin(), __y.end()); }
1531 template<
typename _Tp,
typename _Alloc>
1534 {
return !(__x == __y); }
1537 template<
typename _Tp,
typename _Alloc>
1540 {
return __y < __x; }
1543 template<
typename _Tp,
typename _Alloc>
1546 {
return !(__y < __x); }
1549 template<
typename _Tp,
typename _Alloc>
1552 {
return !(__x < __y); }
1555 template<
typename _Tp,
typename _Alloc>
1558 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y)))
1561 _GLIBCXX_END_NAMESPACE_CONTAINER
const_iterator cbegin() const noexcept
iterator insert(const_iterator __position, size_type __n, const value_type &__x)
Inserts a number of copies of given data into the vector.
iterator erase(const_iterator __first, const_iterator __last)
Remove a range of elements.
void assign(size_type __n, const value_type &__val)
Assigns a given value to a vector.
pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last)
vector(const allocator_type &__a) noexcept
Creates a vector with no elements.
Uniform interface to C++98 and C++11 allocators.
const_iterator begin() const noexcept
vector(const vector &__x, const allocator_type &__a)
Copy constructor with alternative allocator.
_GLIBCXX14_CONSTEXPR const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
void _Destroy(_Tp *__pointer)
vector(const vector &__x)
Vector copy constructor.
vector(size_type __n, const allocator_type &__a=allocator_type())
Creates a vector with default constructed elements.
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
vector(size_type __n, const value_type &__value, const allocator_type &__a=allocator_type())
Creates a vector with copies of an exemplar element.
vector & operator=(initializer_list< value_type > __l)
Vector list assignment operator.
const_iterator end() const noexcept
void assign(_InputIterator __first, _InputIterator __last)
Assigns a range to a vector.
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
vector(vector &&__rv, const allocator_type &__m) noexcept(_Alloc_traits::_S_always_equal())
Move constructor with alternative allocator.
void _M_range_check(size_type __n) const
Safety check used only from at().
vector(_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
Builds a vector from a range.
iterator insert(const_iterator __position, initializer_list< value_type > __l)
Inserts an initializer_list into the vector.
iterator erase(const_iterator __position)
Remove element at given position.
size_type max_size() const noexcept
constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont))
Return an iterator pointing to the first element of the const container.
_Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
const_iterator cend() const noexcept
const_reference at(size_type __n) const
Provides access to the data contained in the vector.
reference back() noexcept
void pop_back() noexcept
Removes last element.
const_reference operator[](size_type __n) const noexcept
Subscript access to the data contained in the vector.
void assign(initializer_list< value_type > __l)
Assigns an initializer list to a vector.
const_reference front() const noexcept
const_reference back() const noexcept
void swap(vector &__x) noexcept
Swaps data with another vector.
reference front() noexcept
bool empty() const noexcept
vector(initializer_list< value_type > __l, const allocator_type &__a=allocator_type())
Builds a vector from an initializer list.
void resize(size_type __new_size)
Resizes the vector to the specified number of elements.
const_reverse_iterator rend() const noexcept
bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp)
Performs dictionary comparison on ranges.
A standard container which offers fixed time access to individual elements in any order...
Random-access iterators support a superset of bidirectional iterator operations.
reference operator[](size_type __n) noexcept
Subscript access to the data contained in the vector.
iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
Inserts a range into the vector.
void resize(size_type __new_size, const value_type &__x)
Resizes the vector to the specified number of elements.
const_reverse_iterator crbegin() const noexcept
size_type size() const noexcept
Forward iterators support a superset of input iterator operations.
vector & operator=(vector &&__x) noexcept(_Alloc_traits::_S_nothrow_move())
Vector move assignment operator.
void push_back(const value_type &__x)
Add data to the end of the vector.
vector(vector &&__x) noexcept
Vector move constructor.
reverse_iterator rend() noexcept
See bits/stl_deque.h's _Deque_base for an explanation.
reference at(size_type __n)
Provides access to the data contained in the vector.
iterator begin() noexcept
const_reverse_iterator crend() const noexcept
ISO C++ entities toplevel namespace is std.
const_reverse_iterator rbegin() const noexcept
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
iterator insert(const_iterator __position, value_type &&__x)
Inserts given rvalue into vector before specified iterator.
size_type capacity() const noexcept
bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred)
Tests a range for element-wise equality.
vector() noexcept(is_nothrow_default_constructible< _Alloc >::value)
Creates a vector with no elements.
iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
reverse_iterator rbegin() noexcept
__detected_or_t_< __get_first_arg_t, __element_type, _Ptr > element_type
The type pointed to.