61 #if __cplusplus >= 201103L 67 namespace std _GLIBCXX_VISIBILITY(default)
71 _GLIBCXX_BEGIN_NAMESPACE_VERSION
93 _M_reverse() _GLIBCXX_USE_NOEXCEPT;
99 _M_unhook() _GLIBCXX_USE_NOEXCEPT;
102 _GLIBCXX_END_NAMESPACE_VERSION
105 _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
108 template<
typename _Tp>
111 #if __cplusplus >= 201103L 112 __gnu_cxx::__aligned_membuf<_Tp> _M_storage;
113 _Tp* _M_valptr() {
return _M_storage._M_ptr(); }
114 _Tp
const* _M_valptr()
const {
return _M_storage._M_ptr(); }
127 template<
typename _Tp>
133 typedef ptrdiff_t difference_type;
135 typedef _Tp value_type;
136 typedef _Tp* pointer;
137 typedef _Tp& reference;
147 _M_const_cast()
const _GLIBCXX_NOEXCEPT
153 {
return *
static_cast<_Node*
>(_M_node)->_M_valptr(); }
156 operator->()
const _GLIBCXX_NOEXCEPT
157 {
return static_cast<_Node*
>(_M_node)->_M_valptr(); }
160 operator++() _GLIBCXX_NOEXCEPT
162 _M_node = _M_node->_M_next;
167 operator++(
int) _GLIBCXX_NOEXCEPT
170 _M_node = _M_node->_M_next;
175 operator--() _GLIBCXX_NOEXCEPT
177 _M_node = _M_node->_M_prev;
182 operator--(
int) _GLIBCXX_NOEXCEPT
185 _M_node = _M_node->_M_prev;
190 operator==(
const _Self& __x)
const _GLIBCXX_NOEXCEPT
191 {
return _M_node == __x._M_node; }
194 operator!=(
const _Self& __x)
const _GLIBCXX_NOEXCEPT
195 {
return _M_node != __x._M_node; }
206 template<
typename _Tp>
213 typedef ptrdiff_t difference_type;
215 typedef _Tp value_type;
216 typedef const _Tp* pointer;
217 typedef const _Tp& reference;
228 : _M_node(__x._M_node) { }
231 _M_const_cast()
const _GLIBCXX_NOEXCEPT
232 {
return iterator(const_cast<__detail::_List_node_base*>(_M_node)); }
237 {
return *
static_cast<_Node*
>(_M_node)->_M_valptr(); }
240 operator->()
const _GLIBCXX_NOEXCEPT
241 {
return static_cast<_Node*
>(_M_node)->_M_valptr(); }
244 operator++() _GLIBCXX_NOEXCEPT
246 _M_node = _M_node->_M_next;
251 operator++(
int) _GLIBCXX_NOEXCEPT
254 _M_node = _M_node->_M_next;
259 operator--() _GLIBCXX_NOEXCEPT
261 _M_node = _M_node->_M_prev;
266 operator--(
int) _GLIBCXX_NOEXCEPT
269 _M_node = _M_node->_M_prev;
274 operator==(
const _Self& __x)
const _GLIBCXX_NOEXCEPT
275 {
return _M_node == __x._M_node; }
278 operator!=(
const _Self& __x)
const _GLIBCXX_NOEXCEPT
279 {
return _M_node != __x._M_node; }
285 template<
typename _Val>
289 {
return __x._M_node == __y._M_node; }
291 template<
typename _Val>
295 {
return __x._M_node != __y._M_node; }
297 _GLIBCXX_BEGIN_NAMESPACE_CXX11
299 template<
typename _Tp,
typename _Alloc>
304 rebind<_Tp>::other _Tp_alloc_type;
306 typedef typename _Tp_alloc_traits::template
307 rebind<_List_node<_Tp> >::other _Node_alloc_type;
315 while (__first != __last)
317 __first = __first->_M_next;
324 :
public _Node_alloc_type
326 #if _GLIBCXX_USE_CXX11_ABI 332 _List_impl() _GLIBCXX_NOEXCEPT
333 : _Node_alloc_type(), _M_node()
336 _List_impl(
const _Node_alloc_type& __a) _GLIBCXX_NOEXCEPT
337 : _Node_alloc_type(__a), _M_node()
340 #if __cplusplus >= 201103L 341 _List_impl(_Node_alloc_type&& __a) noexcept
342 : _Node_alloc_type(std::move(__a)), _M_node()
349 #if _GLIBCXX_USE_CXX11_ABI 350 size_t _M_get_size()
const {
return *_M_impl._M_node._M_valptr(); }
352 void _M_set_size(
size_t __n) { *_M_impl._M_node._M_valptr() = __n; }
354 void _M_inc_size(
size_t __n) { *_M_impl._M_node._M_valptr() += __n; }
356 void _M_dec_size(
size_t __n) { *_M_impl._M_node._M_valptr() -= __n; }
361 {
return _S_distance(__first, __last); }
364 size_t _M_node_count()
const {
return *_M_impl._M_node._M_valptr(); }
367 size_t _M_get_size()
const {
return 0; }
368 void _M_set_size(
size_t) { }
369 void _M_inc_size(
size_t) { }
370 void _M_dec_size(
size_t) { }
371 size_t _M_distance(
const void*,
const void*)
const {
return 0; }
374 size_t _M_node_count()
const 376 return _S_distance(_M_impl._M_node._M_next,
381 typename _Node_alloc_traits::pointer
383 {
return _Node_alloc_traits::allocate(_M_impl, 1); }
386 _M_put_node(
typename _Node_alloc_traits::pointer __p) _GLIBCXX_NOEXCEPT
387 { _Node_alloc_traits::deallocate(_M_impl, __p, 1); }
390 typedef _Alloc allocator_type;
393 _M_get_Node_allocator() _GLIBCXX_NOEXCEPT
396 const _Node_alloc_type&
397 _M_get_Node_allocator()
const _GLIBCXX_NOEXCEPT
404 _List_base(
const _Node_alloc_type& __a) _GLIBCXX_NOEXCEPT
408 #if __cplusplus >= 201103L 410 : _M_impl(std::move(__x._M_get_Node_allocator()))
411 { _M_move_nodes(std::move(__x)); }
414 : _M_impl(std::move(__a))
416 if (__x._M_get_Node_allocator() == _M_get_Node_allocator())
417 _M_move_nodes(std::move(__x));
426 if (__xnode->_M_next == __xnode)
431 __node->_M_next = __xnode->_M_next;
432 __node->_M_prev = __xnode->_M_prev;
433 __node->_M_next->_M_prev = __node->_M_prev->_M_next = __node;
434 _M_set_size(__x._M_get_size());
445 _M_clear() _GLIBCXX_NOEXCEPT;
448 _M_init() _GLIBCXX_NOEXCEPT
450 this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
451 this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
502 template<
typename _Tp,
typename _Alloc = std::allocator<_Tp> >
505 #ifdef _GLIBCXX_CONCEPT_CHECKS 507 typedef typename _Alloc::value_type _Alloc_value_type;
508 # if __cplusplus < 201103L 509 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
511 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
515 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
517 typedef typename _Base::_Node_alloc_type _Node_alloc_type;
521 typedef _Tp value_type;
522 typedef typename _Tp_alloc_traits::pointer pointer;
523 typedef typename _Tp_alloc_traits::const_pointer const_pointer;
524 typedef typename _Tp_alloc_traits::reference reference;
525 typedef typename _Tp_alloc_traits::const_reference const_reference;
530 typedef size_t size_type;
531 typedef ptrdiff_t difference_type;
532 typedef _Alloc allocator_type;
539 using _Base::_M_impl;
540 using _Base::_M_put_node;
541 using _Base::_M_get_node;
542 using _Base::_M_get_Node_allocator;
550 #if __cplusplus < 201103L 552 _M_create_node(
const value_type& __x)
554 _Node* __p = this->_M_get_node();
557 _Tp_alloc_type __alloc(_M_get_Node_allocator());
558 __alloc.construct(__p->_M_valptr(), __x);
563 __throw_exception_again;
568 template<
typename... _Args>
572 auto __p = this->_M_get_node();
573 auto& __alloc = _M_get_Node_allocator();
575 _Node_alloc_traits::construct(__alloc, __p->_M_valptr(),
576 std::forward<_Args>(__args)...);
590 #if __cplusplus >= 201103L 591 noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value)
600 list(
const allocator_type& __a) _GLIBCXX_NOEXCEPT
601 : _Base(_Node_alloc_type(__a)) { }
603 #if __cplusplus >= 201103L 613 list(size_type __n,
const allocator_type& __a = allocator_type())
614 : _Base(_Node_alloc_type(__a))
615 { _M_default_initialize(__n); }
625 list(size_type __n,
const value_type& __value,
626 const allocator_type& __a = allocator_type())
627 : _Base(_Node_alloc_type(__a))
628 { _M_fill_initialize(__n, __value); }
639 list(size_type __n,
const value_type& __value = value_type(),
640 const allocator_type& __a = allocator_type())
641 : _Base(_Node_alloc_type(__a))
642 { _M_fill_initialize(__n, __value); }
653 : _Base(_Node_alloc_traits::
654 _S_select_on_copy(__x._M_get_Node_allocator()))
655 { _M_initialize_dispatch(__x.
begin(), __x.
end(), __false_type()); }
657 #if __cplusplus >= 201103L 666 : _Base(
std::move(__x)) { }
677 const allocator_type& __a = allocator_type())
678 : _Base(_Node_alloc_type(__a))
679 { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); }
681 list(
const list& __x,
const allocator_type& __a)
682 : _Base(_Node_alloc_type(__a))
683 { _M_initialize_dispatch(__x.
begin(), __x.
end(), __false_type()); }
685 list(list&& __x,
const allocator_type& __a)
686 noexcept(_Node_alloc_traits::_S_always_equal())
687 : _Base(std::move(__x), _Node_alloc_type(__a))
691 insert(
begin(), std::__make_move_if_noexcept_iterator(__x.
begin()),
692 std::__make_move_if_noexcept_iterator(__x.
end()));
706 #if __cplusplus >= 201103L 707 template<
typename _InputIterator,
708 typename = std::_RequireInputIter<_InputIterator>>
709 list(_InputIterator __first, _InputIterator __last,
710 const allocator_type& __a = allocator_type())
711 : _Base(_Node_alloc_type(__a))
712 { _M_initialize_dispatch(__first, __last, __false_type()); }
714 template<
typename _InputIterator>
715 list(_InputIterator __first, _InputIterator __last,
716 const allocator_type& __a = allocator_type())
717 : _Base(_Node_alloc_type(__a))
720 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
721 _M_initialize_dispatch(__first, __last, _Integral());
725 #if __cplusplus >= 201103L 745 operator=(
const list& __x);
747 #if __cplusplus >= 201103L 760 noexcept(_Node_alloc_traits::_S_nothrow_move())
762 constexpr
bool __move_storage =
763 _Node_alloc_traits::_S_propagate_on_move_assign()
764 || _Node_alloc_traits::_S_always_equal();
779 this->assign(__l.begin(), __l.end());
795 assign(size_type __n,
const value_type& __val)
796 { _M_fill_assign(__n, __val); }
810 #if __cplusplus >= 201103L 811 template<
typename _InputIterator,
812 typename = std::_RequireInputIter<_InputIterator>>
814 assign(_InputIterator __first, _InputIterator __last)
815 { _M_assign_dispatch(__first, __last, __false_type()); }
817 template<
typename _InputIterator>
819 assign(_InputIterator __first, _InputIterator __last)
822 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
823 _M_assign_dispatch(__first, __last, _Integral());
827 #if __cplusplus >= 201103L 837 { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); }
843 {
return allocator_type(_Base::_M_get_Node_allocator()); }
852 {
return iterator(this->_M_impl._M_node._M_next); }
861 {
return const_iterator(this->_M_impl._M_node._M_next); }
870 {
return iterator(&this->_M_impl._M_node); }
878 end() const _GLIBCXX_NOEXCEPT
879 {
return const_iterator(&this->_M_impl._M_node); }
888 {
return reverse_iterator(
end()); }
895 const_reverse_iterator
897 {
return const_reverse_iterator(
end()); }
906 {
return reverse_iterator(
begin()); }
913 const_reverse_iterator
915 {
return const_reverse_iterator(
begin()); }
917 #if __cplusplus >= 201103L 925 {
return const_iterator(this->_M_impl._M_node._M_next); }
934 {
return const_iterator(&this->_M_impl._M_node); }
941 const_reverse_iterator
943 {
return const_reverse_iterator(
end()); }
950 const_reverse_iterator
952 {
return const_reverse_iterator(
begin()); }
962 {
return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
967 {
return this->_M_node_count(); }
972 {
return _Node_alloc_traits::max_size(_M_get_Node_allocator()); }
974 #if __cplusplus >= 201103L 985 resize(size_type __new_size);
998 resize(size_type __new_size,
const value_type& __x);
1011 resize(size_type __new_size, value_type __x = value_type());
1021 {
return *
begin(); }
1029 {
return *
begin(); }
1038 iterator __tmp =
end();
1050 const_iterator __tmp =
end();
1068 { this->_M_insert(
begin(), __x); }
1070 #if __cplusplus >= 201103L 1072 push_front(value_type&& __x)
1073 { this->_M_insert(
begin(), std::move(__x)); }
1075 template<
typename... _Args>
1076 #if __cplusplus > 201402L 1081 emplace_front(_Args&&... __args)
1083 this->_M_insert(
begin(), std::forward<_Args>(__args)...);
1084 #if __cplusplus > 201402L 1104 { this->_M_erase(
begin()); }
1118 { this->_M_insert(
end(), __x); }
1120 #if __cplusplus >= 201103L 1122 push_back(value_type&& __x)
1123 { this->_M_insert(
end(), std::move(__x)); }
1125 template<
typename... _Args>
1126 #if __cplusplus > 201402L 1131 emplace_back(_Args&&... __args)
1133 this->_M_insert(
end(), std::forward<_Args>(__args)...);
1134 #if __cplusplus > 201402L 1153 { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
1155 #if __cplusplus >= 201103L 1168 template<
typename... _Args>
1170 emplace(const_iterator __position, _Args&&... __args);
1184 insert(const_iterator __position,
const value_type& __x);
1198 insert(iterator __position,
const value_type& __x);
1201 #if __cplusplus >= 201103L 1214 insert(const_iterator __position, value_type&& __x)
1215 {
return emplace(__position, std::move(__x)); }
1234 {
return this->insert(__p, __l.begin(), __l.end()); }
1237 #if __cplusplus >= 201103L 1253 insert(const_iterator __position, size_type __n,
const value_type& __x);
1268 insert(iterator __position, size_type __n,
const value_type& __x)
1270 list __tmp(__n, __x, get_allocator());
1271 splice(__position, __tmp);
1275 #if __cplusplus >= 201103L 1291 template<
typename _InputIterator,
1292 typename = std::_RequireInputIter<_InputIterator>>
1294 insert(const_iterator __position, _InputIterator __first,
1295 _InputIterator __last);
1310 template<
typename _InputIterator>
1312 insert(iterator __position, _InputIterator __first,
1313 _InputIterator __last)
1315 list __tmp(__first, __last, get_allocator());
1316 splice(__position, __tmp);
1336 #if __cplusplus >= 201103L 1337 erase(const_iterator __position) noexcept;
1339 erase(iterator __position);
1361 #if __cplusplus >= 201103L 1362 erase(const_iterator __first, const_iterator __last) noexcept
1364 erase(iterator __first, iterator __last)
1367 while (__first != __last)
1368 __first = erase(__first);
1369 return __last._M_const_cast();
1386 __detail::_List_node_base::swap(this->_M_impl._M_node,
1387 __x._M_impl._M_node);
1389 size_t __xsize = __x._M_get_size();
1390 __x._M_set_size(this->_M_get_size());
1391 this->_M_set_size(__xsize);
1393 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(),
1394 __x._M_get_Node_allocator());
1423 #if __cplusplus >= 201103L 1424 splice(const_iterator __position, list&& __x) noexcept
1426 splice(iterator __position, list& __x)
1431 _M_check_equal_allocators(__x);
1433 this->_M_transfer(__position._M_const_cast(),
1436 this->_M_inc_size(__x._M_get_size());
1441 #if __cplusplus >= 201103L 1443 splice(const_iterator __position, list& __x) noexcept
1444 { splice(__position, std::move(__x)); }
1447 #if __cplusplus >= 201103L 1459 splice(const_iterator __position, list&& __x, const_iterator __i) noexcept
1471 splice(iterator __position, list& __x, iterator __i)
1474 iterator __j = __i._M_const_cast();
1476 if (__position == __i || __position == __j)
1480 _M_check_equal_allocators(__x);
1482 this->_M_transfer(__position._M_const_cast(),
1483 __i._M_const_cast(), __j);
1485 this->_M_inc_size(1);
1489 #if __cplusplus >= 201103L 1501 splice(const_iterator __position, list& __x, const_iterator __i) noexcept
1502 { splice(__position, std::move(__x), __i); }
1505 #if __cplusplus >= 201103L 1520 splice(const_iterator __position, list&& __x, const_iterator __first,
1521 const_iterator __last) noexcept
1536 splice(iterator __position, list& __x, iterator __first,
1540 if (__first != __last)
1543 _M_check_equal_allocators(__x);
1545 size_t __n = this->_M_distance(__first._M_node, __last._M_node);
1546 this->_M_inc_size(__n);
1547 __x._M_dec_size(__n);
1549 this->_M_transfer(__position._M_const_cast(),
1550 __first._M_const_cast(),
1551 __last._M_const_cast());
1555 #if __cplusplus >= 201103L 1570 splice(const_iterator __position, list& __x, const_iterator __first,
1571 const_iterator __last) noexcept
1572 { splice(__position, std::move(__x), __first, __last); }
1587 remove(
const _Tp& __value);
1600 template<
typename _Predicate>
1602 remove_if(_Predicate);
1629 template<
typename _BinaryPredicate>
1631 unique(_BinaryPredicate);
1642 #if __cplusplus >= 201103L 1648 { merge(std::move(__x)); }
1667 #if __cplusplus >= 201103L 1668 template<
typename _StrictWeakOrdering>
1670 merge(list&& __x, _StrictWeakOrdering __comp);
1672 template<
typename _StrictWeakOrdering>
1674 merge(list& __x, _StrictWeakOrdering __comp)
1675 { merge(std::move(__x), __comp); }
1677 template<
typename _StrictWeakOrdering>
1679 merge(list& __x, _StrictWeakOrdering __comp);
1689 { this->_M_impl._M_node._M_reverse(); }
1706 template<
typename _StrictWeakOrdering>
1708 sort(_StrictWeakOrdering);
1717 template<
typename _Integer>
1719 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
1720 { _M_fill_initialize(static_cast<size_type>(__n), __x); }
1723 template<
typename _InputIterator>
1725 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
1728 for (; __first != __last; ++__first)
1729 #
if __cplusplus >= 201103L
1730 emplace_back(*__first);
1732 push_back(*__first);
1739 _M_fill_initialize(size_type __n,
const value_type& __x)
1745 #if __cplusplus >= 201103L 1748 _M_default_initialize(size_type __n)
1756 _M_default_append(size_type __n);
1765 template<
typename _Integer>
1767 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
1768 { _M_fill_assign(__n, __val); }
1771 template<
typename _InputIterator>
1773 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
1779 _M_fill_assign(size_type __n,
const value_type& __val);
1784 _M_transfer(iterator __position, iterator __first, iterator __last)
1785 { __position._M_node->_M_transfer(__first._M_node, __last._M_node); }
1788 #if __cplusplus < 201103L 1790 _M_insert(iterator __position,
const value_type& __x)
1792 _Node* __tmp = _M_create_node(__x);
1793 __tmp->_M_hook(__position._M_node);
1794 this->_M_inc_size(1);
1797 template<
typename... _Args>
1799 _M_insert(iterator __position, _Args&&... __args)
1801 _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
1802 __tmp->_M_hook(__position._M_node);
1803 this->_M_inc_size(1);
1809 _M_erase(iterator __position) _GLIBCXX_NOEXCEPT
1811 this->_M_dec_size(1);
1812 __position._M_node->_M_unhook();
1813 _Node* __n =
static_cast<_Node*
>(__position._M_node);
1814 #if __cplusplus >= 201103L 1815 _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr());
1817 _Tp_alloc_type(_M_get_Node_allocator()).destroy(__n->_M_valptr());
1825 _M_check_equal_allocators(list& __x) _GLIBCXX_NOEXCEPT
1827 if (std::__alloc_neq<typename _Base::_Node_alloc_type>::
1828 _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()))
1834 _M_resize_pos(size_type& __new_size)
const;
1836 #if __cplusplus >= 201103L 1838 _M_move_assign(list&& __x,
true_type) noexcept
1845 this->_M_impl._M_node._M_next = __x._M_impl._M_node._M_next;
1846 this->_M_impl._M_node._M_next->_M_prev = &this->_M_impl._M_node;
1847 this->_M_impl._M_node._M_prev = __x._M_impl._M_node._M_prev;
1848 this->_M_impl._M_node._M_prev->_M_next = &this->_M_impl._M_node;
1849 this->_M_set_size(__x._M_get_size());
1852 std::__alloc_on_move(this->_M_get_Node_allocator(),
1853 __x._M_get_Node_allocator());
1859 if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator())
1860 _M_move_assign(std::move(__x),
true_type{});
1864 _M_assign_dispatch(std::__make_move_if_noexcept_iterator(__x.
begin()),
1865 std::__make_move_if_noexcept_iterator(__x.
end()),
1870 _GLIBCXX_END_NAMESPACE_CXX11
1882 template<
typename _Tp,
typename _Alloc>
1886 #if _GLIBCXX_USE_CXX11_ABI 1892 const_iterator __end1 = __x.
end();
1893 const_iterator __end2 = __y.
end();
1895 const_iterator __i1 = __x.
begin();
1896 const_iterator __i2 = __y.
begin();
1897 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
1902 return __i1 == __end1 && __i2 == __end2;
1916 template<
typename _Tp,
typename _Alloc>
1920 __y.begin(), __y.end()); }
1923 template<
typename _Tp,
typename _Alloc>
1926 {
return !(__x == __y); }
1929 template<
typename _Tp,
typename _Alloc>
1932 {
return __y < __x; }
1935 template<
typename _Tp,
typename _Alloc>
1938 {
return !(__y < __x); }
1941 template<
typename _Tp,
typename _Alloc>
1944 {
return !(__x < __y); }
1947 template<
typename _Tp,
typename _Alloc>
1950 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y)))
1953 _GLIBCXX_END_NAMESPACE_CONTAINER
1955 #if _GLIBCXX_USE_CXX11_ABI 1956 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1959 template<
typename _Tp>
1961 __distance(_GLIBCXX_STD_C::_List_iterator<_Tp> __first,
1962 _GLIBCXX_STD_C::_List_iterator<_Tp> __last,
1965 typedef _GLIBCXX_STD_C::_List_const_iterator<_Tp> _CIter;
1966 return std::__distance(_CIter(__first), _CIter(__last), __tag);
1969 template<
typename _Tp>
1971 __distance(_GLIBCXX_STD_C::_List_const_iterator<_Tp> __first,
1972 _GLIBCXX_STD_C::_List_const_iterator<_Tp> __last,
1975 typedef _GLIBCXX_STD_C::_List_node<size_t> _Sentinel;
1976 _GLIBCXX_STD_C::_List_const_iterator<_Tp> __beyond = __last;
1978 bool __whole = __first == __beyond;
1979 if (__builtin_constant_p (__whole) && __whole)
1980 return *
static_cast<const _Sentinel*
>(__last._M_node)->_M_valptr();
1983 while (__first != __last)
1991 _GLIBCXX_END_NAMESPACE_VERSION
size_type max_size() const noexcept
void splice(const_iterator __position, list &__x, const_iterator __i) noexcept
Insert element from another list.
reference back() noexcept
iterator begin() noexcept
list(size_type __n, const value_type &__value, const allocator_type &__a=allocator_type())
Creates a list with copies of an exemplar element.
void swap(list &__x) noexcept
Swaps data with another list.
list(const allocator_type &__a) noexcept
Creates a list with no elements.
const_reverse_iterator rbegin() const noexcept
Uniform interface to C++98 and C++11 allocators.
complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
void push_front(const value_type &__x)
Add data to the front of the list.
list(list &&__x) noexcept
List move constructor.
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
reference front() noexcept
const_iterator cend() const noexcept
list & operator=(list &&__x) noexcept(_Node_alloc_traits::_S_nothrow_move())
List move assignment operator.
See bits/stl_deque.h's _Deque_base for an explanation.
reverse_iterator rbegin() noexcept
bool empty() const noexcept
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
void assign(initializer_list< value_type > __l)
Assigns an initializer_list to a list.
iterator erase(const_iterator __first, const_iterator __last) noexcept
Remove a range of elements.
iterator insert(const_iterator __position, value_type &&__x)
Inserts given rvalue into list before specified iterator.
ISO C++ entities toplevel namespace is std.
list(initializer_list< value_type > __l, const allocator_type &__a=allocator_type())
Builds a list from an initializer_list.
Common part of a node in the list.
void splice(const_iterator __position, list &&__x) noexcept
Insert contents of another list.
void pop_front() noexcept
Removes first element.
const_reference back() const noexcept
bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp)
Performs dictionary comparison on ranges.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
An actual node in the list.
const_iterator end() const noexcept
allocator_type get_allocator() const noexcept
Get a copy of the memory allocation object.
list & operator=(initializer_list< value_type > __l)
List initializer list assignment operator.
iterator insert(const_iterator __p, initializer_list< value_type > __l)
Inserts the contents of an initializer_list into list before specified const_iterator.
list(size_type __n, const allocator_type &__a=allocator_type())
Creates a list with default constructed elements.
_Node * _M_create_node(_Args &&...__args)
reverse_iterator rend() noexcept
void splice(const_iterator __position, list &__x, const_iterator __first, const_iterator __last) noexcept
Insert range from another list.
void pop_back() noexcept
Removes last element.
void reverse() noexcept
Reverse the elements in list.
void splice(const_iterator __position, list &&__x, const_iterator __first, const_iterator __last) noexcept
Insert range from another list.
void assign(_InputIterator __first, _InputIterator __last)
Assigns a range to a list.
const_reverse_iterator rend() const noexcept
const_iterator begin() const noexcept
const_reference front() const noexcept
A standard container with linear time access to elements, and fixed time insertion/deletion at any po...
const_iterator cbegin() const noexcept
void push_back(const value_type &__x)
Add data to the end of the list.
const_reverse_iterator crend() const noexcept
list(const list &__x)
List copy constructor.
void assign(size_type __n, const value_type &__val)
Assigns a given value to a list.
list() noexcept(is_nothrow_default_constructible< _Node_alloc_type >::value)
Creates a list with no elements.
list(_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
Builds a list from a range.
void splice(const_iterator __position, list &&__x, const_iterator __i) noexcept
Insert element from another list.
size_type size() const noexcept
Non-standard RAII type for managing pointers obtained from allocators.
const_reverse_iterator crbegin() const noexcept
Bidirectional iterators support a superset of forward iterator operations.