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> >
506 typedef typename _Alloc::value_type _Alloc_value_type;
507 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
508 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
511 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
513 typedef typename _Base::_Node_alloc_type _Node_alloc_type;
517 typedef _Tp value_type;
518 typedef typename _Tp_alloc_traits::pointer pointer;
519 typedef typename _Tp_alloc_traits::const_pointer const_pointer;
520 typedef typename _Tp_alloc_traits::reference reference;
521 typedef typename _Tp_alloc_traits::const_reference const_reference;
526 typedef size_t size_type;
527 typedef ptrdiff_t difference_type;
528 typedef _Alloc allocator_type;
535 using _Base::_M_impl;
536 using _Base::_M_put_node;
537 using _Base::_M_get_node;
538 using _Base::_M_get_Node_allocator;
546 #if __cplusplus < 201103L 548 _M_create_node(
const value_type& __x)
550 _Node* __p = this->_M_get_node();
553 _Tp_alloc_type __alloc(_M_get_Node_allocator());
554 __alloc.construct(__p->_M_valptr(), __x);
559 __throw_exception_again;
564 template<
typename... _Args>
568 auto __p = this->_M_get_node();
569 auto& __alloc = _M_get_Node_allocator();
571 _Node_alloc_traits::construct(__alloc, __p->_M_valptr(),
572 std::forward<_Args>(__args)...);
586 #if __cplusplus >= 201103L 587 noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value)
596 list(
const allocator_type& __a) _GLIBCXX_NOEXCEPT
597 : _Base(_Node_alloc_type(__a)) { }
599 #if __cplusplus >= 201103L 609 list(size_type __n,
const allocator_type& __a = allocator_type())
610 : _Base(_Node_alloc_type(__a))
611 { _M_default_initialize(__n); }
621 list(size_type __n,
const value_type& __value,
622 const allocator_type& __a = allocator_type())
623 : _Base(_Node_alloc_type(__a))
624 { _M_fill_initialize(__n, __value); }
635 list(size_type __n,
const value_type& __value = value_type(),
636 const allocator_type& __a = allocator_type())
637 : _Base(_Node_alloc_type(__a))
638 { _M_fill_initialize(__n, __value); }
649 : _Base(_Node_alloc_traits::
650 _S_select_on_copy(__x._M_get_Node_allocator()))
651 { _M_initialize_dispatch(__x.
begin(), __x.
end(), __false_type()); }
653 #if __cplusplus >= 201103L 662 : _Base(
std::move(__x)) { }
673 const allocator_type& __a = allocator_type())
674 : _Base(_Node_alloc_type(__a))
675 { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); }
677 list(
const list& __x,
const allocator_type& __a)
678 : _Base(_Node_alloc_type(__a))
679 { _M_initialize_dispatch(__x.
begin(), __x.
end(), __false_type()); }
681 list(list&& __x,
const allocator_type& __a)
682 noexcept(_Node_alloc_traits::_S_always_equal())
683 : _Base(std::move(__x), _Node_alloc_type(__a))
687 insert(
begin(), std::__make_move_if_noexcept_iterator(__x.
begin()),
688 std::__make_move_if_noexcept_iterator(__x.
end()));
702 #if __cplusplus >= 201103L 703 template<
typename _InputIterator,
704 typename = std::_RequireInputIter<_InputIterator>>
705 list(_InputIterator __first, _InputIterator __last,
706 const allocator_type& __a = allocator_type())
707 : _Base(_Node_alloc_type(__a))
708 { _M_initialize_dispatch(__first, __last, __false_type()); }
710 template<
typename _InputIterator>
711 list(_InputIterator __first, _InputIterator __last,
712 const allocator_type& __a = allocator_type())
713 : _Base(_Node_alloc_type(__a))
716 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
717 _M_initialize_dispatch(__first, __last, _Integral());
737 operator=(
const list& __x);
739 #if __cplusplus >= 201103L 749 noexcept(_Node_alloc_traits::_S_nothrow_move())
751 constexpr
bool __move_storage =
752 _Node_alloc_traits::_S_propagate_on_move_assign()
753 || _Node_alloc_traits::_S_always_equal();
768 this->assign(__l.begin(), __l.end());
784 assign(size_type __n,
const value_type& __val)
785 { _M_fill_assign(__n, __val); }
799 #if __cplusplus >= 201103L 800 template<
typename _InputIterator,
801 typename = std::_RequireInputIter<_InputIterator>>
803 assign(_InputIterator __first, _InputIterator __last)
804 { _M_assign_dispatch(__first, __last, __false_type()); }
806 template<
typename _InputIterator>
808 assign(_InputIterator __first, _InputIterator __last)
811 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
812 _M_assign_dispatch(__first, __last, _Integral());
816 #if __cplusplus >= 201103L 826 { this->assign(__l.begin(), __l.end()); }
832 {
return allocator_type(_Base::_M_get_Node_allocator()); }
841 {
return iterator(this->_M_impl._M_node._M_next); }
850 {
return const_iterator(this->_M_impl._M_node._M_next); }
859 {
return iterator(&this->_M_impl._M_node); }
867 end() const _GLIBCXX_NOEXCEPT
868 {
return const_iterator(&this->_M_impl._M_node); }
877 {
return reverse_iterator(
end()); }
884 const_reverse_iterator
886 {
return const_reverse_iterator(
end()); }
895 {
return reverse_iterator(
begin()); }
902 const_reverse_iterator
904 {
return const_reverse_iterator(
begin()); }
906 #if __cplusplus >= 201103L 914 {
return const_iterator(this->_M_impl._M_node._M_next); }
923 {
return const_iterator(&this->_M_impl._M_node); }
930 const_reverse_iterator
932 {
return const_reverse_iterator(
end()); }
939 const_reverse_iterator
941 {
return const_reverse_iterator(
begin()); }
951 {
return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
956 {
return this->_M_node_count(); }
961 {
return _Node_alloc_traits::max_size(_M_get_Node_allocator()); }
963 #if __cplusplus >= 201103L 974 resize(size_type __new_size);
987 resize(size_type __new_size,
const value_type& __x);
1000 resize(size_type __new_size, value_type __x = value_type());
1010 {
return *
begin(); }
1018 {
return *
begin(); }
1027 iterator __tmp =
end();
1039 const_iterator __tmp =
end();
1057 { this->_M_insert(
begin(), __x); }
1059 #if __cplusplus >= 201103L 1061 push_front(value_type&& __x)
1062 { this->_M_insert(
begin(), std::move(__x)); }
1064 template<
typename... _Args>
1066 emplace_front(_Args&&... __args)
1067 { this->_M_insert(
begin(), std::forward<_Args>(__args)...); }
1084 { this->_M_erase(
begin()); }
1098 { this->_M_insert(
end(), __x); }
1100 #if __cplusplus >= 201103L 1102 push_back(value_type&& __x)
1103 { this->_M_insert(
end(), std::move(__x)); }
1105 template<
typename... _Args>
1107 emplace_back(_Args&&... __args)
1108 { this->_M_insert(
end(), std::forward<_Args>(__args)...); }
1124 { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
1126 #if __cplusplus >= 201103L 1139 template<
typename... _Args>
1141 emplace(const_iterator __position, _Args&&... __args);
1155 insert(const_iterator __position,
const value_type& __x);
1169 insert(iterator __position,
const value_type& __x);
1172 #if __cplusplus >= 201103L 1185 insert(const_iterator __position, value_type&& __x)
1186 {
return emplace(__position, std::move(__x)); }
1205 {
return this->insert(__p, __l.begin(), __l.end()); }
1208 #if __cplusplus >= 201103L 1224 insert(const_iterator __position, size_type __n,
const value_type& __x);
1239 insert(iterator __position, size_type __n,
const value_type& __x)
1241 list __tmp(__n, __x, get_allocator());
1242 splice(__position, __tmp);
1246 #if __cplusplus >= 201103L 1262 template<
typename _InputIterator,
1263 typename = std::_RequireInputIter<_InputIterator>>
1265 insert(const_iterator __position, _InputIterator __first,
1266 _InputIterator __last);
1281 template<
typename _InputIterator>
1283 insert(iterator __position, _InputIterator __first,
1284 _InputIterator __last)
1286 list __tmp(__first, __last, get_allocator());
1287 splice(__position, __tmp);
1307 #if __cplusplus >= 201103L 1308 erase(const_iterator __position) noexcept;
1310 erase(iterator __position);
1332 #if __cplusplus >= 201103L 1333 erase(const_iterator __first, const_iterator __last) noexcept
1335 erase(iterator __first, iterator __last)
1338 while (__first != __last)
1339 __first = erase(__first);
1340 return __last._M_const_cast();
1355 __detail::_List_node_base::swap(this->_M_impl._M_node,
1356 __x._M_impl._M_node);
1358 size_t __xsize = __x._M_get_size();
1359 __x._M_set_size(this->_M_get_size());
1360 this->_M_set_size(__xsize);
1362 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(),
1363 __x._M_get_Node_allocator());
1392 #if __cplusplus >= 201103L 1393 splice(const_iterator __position, list&& __x) noexcept
1395 splice(iterator __position, list& __x)
1400 _M_check_equal_allocators(__x);
1402 this->_M_transfer(__position._M_const_cast(),
1405 this->_M_inc_size(__x._M_get_size());
1410 #if __cplusplus >= 201103L 1412 splice(const_iterator __position, list& __x) noexcept
1413 { splice(__position, std::move(__x)); }
1416 #if __cplusplus >= 201103L 1428 splice(const_iterator __position, list&& __x, const_iterator __i) noexcept
1440 splice(iterator __position, list& __x, iterator __i)
1443 iterator __j = __i._M_const_cast();
1445 if (__position == __i || __position == __j)
1449 _M_check_equal_allocators(__x);
1451 this->_M_transfer(__position._M_const_cast(),
1452 __i._M_const_cast(), __j);
1454 this->_M_inc_size(1);
1458 #if __cplusplus >= 201103L 1470 splice(const_iterator __position, list& __x, const_iterator __i) noexcept
1471 { splice(__position, std::move(__x), __i); }
1474 #if __cplusplus >= 201103L 1489 splice(const_iterator __position, list&& __x, const_iterator __first,
1490 const_iterator __last) noexcept
1505 splice(iterator __position, list& __x, iterator __first,
1509 if (__first != __last)
1512 _M_check_equal_allocators(__x);
1514 size_t __n = this->_M_distance(__first._M_node, __last._M_node);
1515 this->_M_inc_size(__n);
1516 __x._M_dec_size(__n);
1518 this->_M_transfer(__position._M_const_cast(),
1519 __first._M_const_cast(),
1520 __last._M_const_cast());
1524 #if __cplusplus >= 201103L 1539 splice(const_iterator __position, list& __x, const_iterator __first,
1540 const_iterator __last) noexcept
1541 { splice(__position, std::move(__x), __first, __last); }
1556 remove(
const _Tp& __value);
1569 template<
typename _Predicate>
1571 remove_if(_Predicate);
1598 template<
typename _BinaryPredicate>
1600 unique(_BinaryPredicate);
1611 #if __cplusplus >= 201103L 1617 { merge(std::move(__x)); }
1636 #if __cplusplus >= 201103L 1637 template<
typename _StrictWeakOrdering>
1639 merge(list&& __x, _StrictWeakOrdering __comp);
1641 template<
typename _StrictWeakOrdering>
1643 merge(list& __x, _StrictWeakOrdering __comp)
1644 { merge(std::move(__x), __comp); }
1646 template<
typename _StrictWeakOrdering>
1648 merge(list& __x, _StrictWeakOrdering __comp);
1658 { this->_M_impl._M_node._M_reverse(); }
1675 template<
typename _StrictWeakOrdering>
1677 sort(_StrictWeakOrdering);
1686 template<
typename _Integer>
1688 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
1689 { _M_fill_initialize(static_cast<size_type>(__n), __x); }
1692 template<
typename _InputIterator>
1694 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
1697 for (; __first != __last; ++__first)
1698 #
if __cplusplus >= 201103L
1699 emplace_back(*__first);
1701 push_back(*__first);
1708 _M_fill_initialize(size_type __n,
const value_type& __x)
1714 #if __cplusplus >= 201103L 1717 _M_default_initialize(size_type __n)
1725 _M_default_append(size_type __n);
1734 template<
typename _Integer>
1736 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
1737 { _M_fill_assign(__n, __val); }
1740 template<
typename _InputIterator>
1742 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
1748 _M_fill_assign(size_type __n,
const value_type& __val);
1753 _M_transfer(iterator __position, iterator __first, iterator __last)
1754 { __position._M_node->_M_transfer(__first._M_node, __last._M_node); }
1757 #if __cplusplus < 201103L 1759 _M_insert(iterator __position,
const value_type& __x)
1761 _Node* __tmp = _M_create_node(__x);
1762 __tmp->_M_hook(__position._M_node);
1763 this->_M_inc_size(1);
1766 template<
typename... _Args>
1768 _M_insert(iterator __position, _Args&&... __args)
1770 _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
1771 __tmp->_M_hook(__position._M_node);
1772 this->_M_inc_size(1);
1778 _M_erase(iterator __position) _GLIBCXX_NOEXCEPT
1780 this->_M_dec_size(1);
1781 __position._M_node->_M_unhook();
1782 _Node* __n =
static_cast<_Node*
>(__position._M_node);
1783 #if __cplusplus >= 201103L 1784 _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr());
1786 _Tp_alloc_type(_M_get_Node_allocator()).destroy(__n->_M_valptr());
1794 _M_check_equal_allocators(list& __x) _GLIBCXX_NOEXCEPT
1796 if (std::__alloc_neq<typename _Base::_Node_alloc_type>::
1797 _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()))
1803 _M_resize_pos(size_type& __new_size)
const;
1805 #if __cplusplus >= 201103L 1807 _M_move_assign(list&& __x,
true_type) noexcept
1814 this->_M_impl._M_node._M_next = __x._M_impl._M_node._M_next;
1815 this->_M_impl._M_node._M_next->_M_prev = &this->_M_impl._M_node;
1816 this->_M_impl._M_node._M_prev = __x._M_impl._M_node._M_prev;
1817 this->_M_impl._M_node._M_prev->_M_next = &this->_M_impl._M_node;
1818 this->_M_set_size(__x._M_get_size());
1821 std::__alloc_on_move(this->_M_get_Node_allocator(),
1822 __x._M_get_Node_allocator());
1828 if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator())
1829 _M_move_assign(std::move(__x),
true_type{});
1833 _M_assign_dispatch(std::__make_move_if_noexcept_iterator(__x.
begin()),
1834 std::__make_move_if_noexcept_iterator(__x.
end()),
1839 _GLIBCXX_END_NAMESPACE_CXX11
1851 template<
typename _Tp,
typename _Alloc>
1855 #if _GLIBCXX_USE_CXX11_ABI 1861 const_iterator __end1 = __x.
end();
1862 const_iterator __end2 = __y.
end();
1864 const_iterator __i1 = __x.
begin();
1865 const_iterator __i2 = __y.
begin();
1866 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
1871 return __i1 == __end1 && __i2 == __end2;
1885 template<
typename _Tp,
typename _Alloc>
1889 __y.begin(), __y.end()); }
1892 template<
typename _Tp,
typename _Alloc>
1895 {
return !(__x == __y); }
1898 template<
typename _Tp,
typename _Alloc>
1901 {
return __y < __x; }
1904 template<
typename _Tp,
typename _Alloc>
1907 {
return !(__y < __x); }
1910 template<
typename _Tp,
typename _Alloc>
1913 {
return !(__x < __y); }
1916 template<
typename _Tp,
typename _Alloc>
1919 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y)))
1922 _GLIBCXX_END_NAMESPACE_CONTAINER
1924 #if _GLIBCXX_USE_CXX11_ABI 1925 _GLIBCXX_BEGIN_NAMESPACE_VERSION
1928 template<
typename _Tp>
1930 __distance(_GLIBCXX_STD_C::_List_iterator<_Tp> __first,
1931 _GLIBCXX_STD_C::_List_iterator<_Tp> __last,
1934 typedef _GLIBCXX_STD_C::_List_const_iterator<_Tp> _CIter;
1935 return std::__distance(_CIter(__first), _CIter(__last), __tag);
1938 template<
typename _Tp>
1940 __distance(_GLIBCXX_STD_C::_List_const_iterator<_Tp> __first,
1941 _GLIBCXX_STD_C::_List_const_iterator<_Tp> __last,
1944 typedef _GLIBCXX_STD_C::_List_node<size_t> _Sentinel;
1945 _GLIBCXX_STD_C::_List_const_iterator<_Tp> __beyond = __last;
1947 bool __whole = __first == __beyond;
1948 if (__builtin_constant_p (__whole) && __whole)
1949 return *
static_cast<const _Sentinel*
>(__last._M_node)->_M_valptr();
1952 while (__first != __last)
1960 _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
complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
Uniform interface to C++98 and C++11 allocators.
void push_front(const value_type &__x)
Add data to the front of the list.
Bidirectional iterators support a superset of forward iterator operations.
list(list &&__x) noexcept
List move constructor.
reference front() noexcept
const_iterator cend() const noexcept
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
An actual node in the list.
Non-standard RAII type for managing pointers obtained from allocators.
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
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
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.
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.
_Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
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
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.
bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp)
Performs dictionary comparison on ranges.
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.
ISO C++ entities toplevel namespace is std.
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
const_reverse_iterator crbegin() const noexcept