📄 slist.html
字号:
</TD>
<TD VAlign=top>
<A href="Container.html">Container</A>
</TD>
<TD VAlign=top>
The destructor.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>slist& operator=(const slist&)</tt>
</TD>
<TD VAlign=top>
<A href="Container.html">Container</A>
</TD>
<TD VAlign=top>
The assignment operator
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void swap(slist&)</tt>
</TD>
<TD VAlign=top>
<A href="Container.html">Container</A>
</TD>
<TD VAlign=top>
Swaps the contents of two slists.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>reference front()</tt>
</TD>
<TD VAlign=top>
<A href="FrontInsertionSequence.html">Front Insertion Sequence</A>
</TD>
<TD VAlign=top>
Returns the first element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>const_reference front() const</tt>
</TD>
<TD VAlign=top>
<A href="FrontInsertionSequence.html">Front Insertion Sequence</A>
</TD>
<TD VAlign=top>
Returns the first element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void push_front(const T&)</tt>
</TD>
<TD VAlign=top>
<A href="FrontInsertionSequence.html">Front Insertion Sequence</A>
</TD>
<TD VAlign=top>
Inserts a new element at the beginning.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void pop_front()</tt>
</TD>
<TD VAlign=top>
<A href="FrontInsertionSequence.html">Front Insertion Sequence</A>
</TD>
<TD VAlign=top>
Removes the first element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator previous(iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>const_iterator previous(const_iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert(iterator pos, const T& x)</tt>
</TD>
<TD VAlign=top>
<A href="Sequence.html">Sequence</A>
</TD>
<TD VAlign=top>
Inserts <tt>x</tt> before <tt>pos</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
template<class InputIterator>
void insert(iterator pos, InputIterator f, InputIterator l)
<A href="#3">[3]</A>
</pre>
</TD>
<TD VAlign=top>
<A href="Sequence.html">Sequence</A>
</TD>
<TD VAlign=top>
Inserts the range <tt>[first, last)</tt> before <tt>pos</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void insert(iterator pos,
size_type n, const value_type& x)
</pre>
</TD>
<TD VAlign=top>
<A href="Sequence.html">Sequence</A>
</TD>
<TD VAlign=top>
Inserts <tt>n</tt> copies of <tt>x</tt> before <tt>pos</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator erase(iterator pos)</tt>
</TD>
<TD VAlign=top>
<A href="Sequence.html">Sequence</A>
</TD>
<TD VAlign=top>
Erases the element at position <tt>pos</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator erase(iterator first, iterator last)</tt>
</TD>
<TD VAlign=top>
<A href="Sequence.html">Sequence</A>
</TD>
<TD VAlign=top>
Erases the range <tt>[first, last)</tt>
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void clear()</tt>
</TD>
<TD VAlign=top>
<A href="Sequence.html">Sequence</A>
</TD>
<TD VAlign=top>
Erases all of the elements.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert_after(iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert_after(iterator pos, const value_type& x)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
template<class InputIterator>
void insert_after(iterator pos,
InputIterator f, InputIterator l)
</pre>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void insert_after(iterator pos,
size_type n, const value_type& x)
</pre>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator erase_after(iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator erase_after(iterator before_first, iterator last)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void splice(iterator position, slist& L)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void splice(iterator position, slist& L, iterator i)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void splice(iterator position, slist& L, iterator f, iterator l)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void splice_after(iterator pos, iterator prev)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void splice_after(iterator pos,
iterator before_first,
iterator before_last)
</pre>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void remove(const T& value)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void unique()</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void merge(slist& L)</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void sort()</tt>
</TD>
<TD VAlign=top>
<tt>slist</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
bool operator==(const slist&,
const slist&)
</pre>
</TD>
<TD VAlign=top>
<A href="ForwardContainer.html">Forward Container</A>
</TD>
<TD VAlign=top>
Tests two slists for equality. This is a global function, not
a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
bool operator<(const slist&,
const slist&)
</pre>
</TD>
<TD VAlign=top>
<A href="ForwardContainer.html">Forward Container</A>
</TD>
<TD VAlign=top>
Lexicographical comparison. This is a global function, not
a member function.
</TD>
</tr>
</table>
<h3>New members</h3>
These members are not defined in the
<A href="FrontInsertionSequence.html">Front Insertion Sequence</A> requirements, but are specific to <tt>slist</tt>:
<Table border>
<TR>
<TH>
Function
</TH>
<TH>
Description
</TH>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator previous(iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>pos</tt> must be a valid iterator in <tt>*this</tt>. The return value is
an iterator <tt>prev</tt> such that <tt>++prev == pos</tt>. Complexity:
linear in the number of iterators in the range <tt>[begin(), pos)</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>const_iterator previous(const_iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>pos</tt> must be a valid iterator in <tt>*this</tt>. The return value is
an iterator <tt>prev</tt> such that <tt>++prev == pos</tt>. Complexity:
linear in the number of iterators in the range <tt>[begin(), pos)</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert_after(iterator pos)</tt>
</TD>
<TD VAlign=top>
<tt>pos</tt> must be a dereferenceable iterator in <tt>*this</tt>. (That is,
<tt>pos</tt> may not be <tt>end()</tt>.) Inserts a copy of <tt>T()</tt> immediately
<i>following</i> <tt>pos</tt>. The return value is an iterator that points
to the new element. Complexity: constant time.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
iterator insert_after(iterator pos,
const value_type& x)
</pre>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -