29 #ifndef _GLIBCXX_PROFILE_FORWARD_LIST
30 #define _GLIBCXX_PROFILE_FORWARD_LIST 1
32 #if __cplusplus < 201103L
38 namespace std _GLIBCXX_VISIBILITY(default)
43 template<
typename _Tp,
typename _Alloc = std::allocator<_Tp> >
45 :
public _GLIBCXX_STD_C::forward_list<_Tp, _Alloc>
47 typedef _GLIBCXX_STD_C::forward_list<_Tp, _Alloc>
_Base;
50 typedef typename _Base::size_type size_type;
51 typedef typename _Base::const_iterator const_iterator;
63 :
_Base(std::move(__list), __al)
67 forward_list(size_type __n,
const _Alloc& __al = _Alloc())
72 const _Alloc& __al = _Alloc())
73 :
_Base(__n, __value, __al)
76 template<
typename _InputIterator,
77 typename = std::_RequireInputIter<_InputIterator>>
78 forward_list(_InputIterator __first, _InputIterator __last,
79 const _Alloc& __al = _Alloc())
80 :
_Base(__first, __last, __al)
83 forward_list(
const forward_list&) =
default;
84 forward_list(forward_list&&) =
default;
87 const _Alloc& __al = _Alloc())
91 ~forward_list() =
default;
94 operator=(
const forward_list&) =
default;
97 operator=(forward_list&&) =
default;
107 swap(forward_list& __fl)
108 noexcept( noexcept(declval<_Base>().swap(__fl)) )
109 { _Base::swap(__fl); }
112 splice_after(const_iterator __pos, forward_list&& __fl)
113 { _Base::splice_after(__pos, std::move(__fl)); }
116 splice_after(const_iterator __pos, forward_list& __list)
117 { _Base::splice_after(__pos, __list); }
120 splice_after(const_iterator __pos, forward_list&& __list,
122 { _Base::splice_after(__pos, std::move(__list), __i); }
125 splice_after(const_iterator __pos, forward_list& __list,
127 { _Base::splice_after(__pos, __list, __i); }
130 splice_after(const_iterator __pos, forward_list&& __list,
131 const_iterator __before, const_iterator __last)
132 { _Base::splice_after(__pos, std::move(__list), __before, __last); }
135 splice_after(const_iterator __pos, forward_list& __list,
136 const_iterator __before, const_iterator __last)
137 { _Base::splice_after(__pos, __list, __before, __last); }
140 merge(forward_list&& __list)
141 { _Base::merge(std::move(__list)); }
144 merge(forward_list& __list)
145 { _Base::merge(__list); }
147 template<
typename _Comp>
149 merge(forward_list&& __list, _Comp __comp)
150 { _Base::merge(std::move(__list), __comp); }
152 template<
typename _Comp>
154 merge(forward_list& __list, _Comp __comp)
155 { _Base::merge(__list, __comp); }
158 _M_base() noexcept {
return *
this; }
161 _M_base()
const noexcept {
return *
this; }
164 template<
typename _Tp,
typename _Alloc>
168 {
return __lx._M_base() == __ly._M_base(); }
170 template<
typename _Tp,
typename _Alloc>
172 operator<(const forward_list<_Tp, _Alloc>& __lx,
174 {
return __lx._M_base() < __ly._M_base(); }
176 template<
typename _Tp,
typename _Alloc>
178 operator!=(
const forward_list<_Tp, _Alloc>& __lx,
179 const forward_list<_Tp, _Alloc>& __ly)
180 {
return !(__lx == __ly); }
183 template<
typename _Tp,
typename _Alloc>
187 {
return (__ly < __lx); }
190 template<
typename _Tp,
typename _Alloc>
194 {
return !(__lx < __ly); }
197 template<
typename _Tp,
typename _Alloc>
199 operator<=(const forward_list<_Tp, _Alloc>& __lx,
201 {
return !(__ly < __lx); }
204 template<
typename _Tp,
typename _Alloc>
Class std::forward_list wrapper with performance instrumentation.
A standard container with linear time access to elements, and fixed time insertion/deletion at any po...