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;
66 :
_Base(std::move(__list), __al)
70 forward_list(size_type __n,
const _Alloc& __al = _Alloc())
75 const _Alloc& __al = _Alloc())
76 :
_Base(__n, __value, __al)
79 template<
typename _InputIterator,
80 typename = std::_RequireInputIter<_InputIterator>>
81 forward_list(_InputIterator __first, _InputIterator __last,
82 const _Alloc& __al = _Alloc())
83 :
_Base(__first, __last, __al)
90 const _Alloc& __al = _Alloc())
111 noexcept( noexcept(declval<_Base&>().swap(__fl)) )
112 { _Base::swap(__fl); }
116 { _Base::splice_after(__pos, std::move(__fl)); }
119 splice_after(const_iterator __pos,
forward_list& __list)
120 { _Base::splice_after(__pos, __list); }
123 splice_after(const_iterator __pos,
forward_list&& __list,
125 { _Base::splice_after(__pos, std::move(__list), __i); }
128 splice_after(const_iterator __pos,
forward_list& __list,
130 { _Base::splice_after(__pos, __list, __i); }
133 splice_after(const_iterator __pos,
forward_list&& __list,
134 const_iterator __before, const_iterator __last)
135 { _Base::splice_after(__pos, std::move(__list), __before, __last); }
138 splice_after(const_iterator __pos,
forward_list& __list,
139 const_iterator __before, const_iterator __last)
140 { _Base::splice_after(__pos, __list, __before, __last); }
144 { _Base::merge(std::move(__list)); }
148 { _Base::merge(__list); }
150 template<
typename _Comp>
153 { _Base::merge(std::move(__list), __comp); }
155 template<
typename _Comp>
158 { _Base::merge(__list, __comp); }
161 _M_base() noexcept {
return *
this; }
164 _M_base()
const noexcept {
return *
this; }
167 template<
typename _Tp,
typename _Alloc>
171 {
return __lx._M_base() == __ly._M_base(); }
173 template<
typename _Tp,
typename _Alloc>
175 operator<(const forward_list<_Tp, _Alloc>& __lx,
177 {
return __lx._M_base() < __ly._M_base(); }
179 template<
typename _Tp,
typename _Alloc>
181 operator!=(
const forward_list<_Tp, _Alloc>& __lx,
182 const forward_list<_Tp, _Alloc>& __ly)
183 {
return !(__lx == __ly); }
186 template<
typename _Tp,
typename _Alloc>
190 {
return (__ly < __lx); }
193 template<
typename _Tp,
typename _Alloc>
197 {
return !(__lx < __ly); }
200 template<
typename _Tp,
typename _Alloc>
202 operator<=(const forward_list<_Tp, _Alloc>& __lx,
204 {
return !(__ly < __lx); }
207 template<
typename _Tp,
typename _Alloc>
211 noexcept(noexcept(__lx.swap(__ly)))
ISO C++ entities toplevel namespace is std.
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...