Members
Member | Where defined | Description |
---|---|---|
value_type |
Container | The type of object, T, stored in the slist. |
pointer |
Container | Pointer to T. |
reference |
Container | Reference to T |
const_reference |
Container | Const reference to T |
size_type |
Container | An unsigned integral type. |
difference_type |
Container | A signed integral type. |
iterator |
Container | Iterator used to iterate through an slist. |
const_iterator |
Container | Const iterator used to iterate through an slist. |
iterator begin() |
Container | Returns an iterator pointing to the beginning of the slist. |
iterator end() |
Container | Returns an iterator pointing to the end of the slist. |
const_iterator begin() const |
Container | Returns a const_iterator pointing to the beginning of the slist. |
const_iterator end() const |
Container | Returns a const_iterator pointing to the end of the slist. |
size_type size() const |
Container | Returns the size of the slist. Note: you should not assume that this function is constant time. It is permitted to be O(N), where N is the number of elements in the slist. If you wish to test whether an slist is empty, you should write L.empty() rather than L.size() == 0. |
size_type max_size() const |
Container | Returns the largest possible size of the slist. |
bool empty() const |
Container | true if the slist's size is 0. |
slist() |
Container | Creates an empty slist. |
slist(size_type n) |
Sequence | Creates an slist with n elements, each of which is a copy of T(). |
slist(size_type n, const T& t) |
Sequence | Creates an slist with n copies of t. |
slist(const slist&) |
Container | The copy constructor. |
template [3] |
Sequence | Creates an slist with a copy of a range. |
~slist() |
Container | The destructor. |
slist& operator=(const slist&) |
Container | The assignment operator |
void swap(slist&) |
Container | Swaps the contents of two slists. |
reference front() |
Front Insertion Sequence | Returns the first element. |
const_reference front() const |
Front Insertion Sequence | Returns the first element. |
void push_front(const T&) |
Front Insertion Sequence | Inserts a new element at the beginning. |
void pop_front() |
Front Insertion Sequence | Removes the first element. |
iterator previous(iterator pos) |
slist |
See below |
const_iterator previous(const_iterator pos) |
slist |
See below |
iterator insert(iterator pos, const T& x) |
Sequence | Inserts x before pos. |
template [3] |
Sequence | Inserts the range [first, last) before pos. |
void insert(iterator pos, size_type n, const value_type& x) |
Sequence | Inserts n copies of x before pos. |
iterator erase(iterator pos) |
Sequence | Erases the element at position pos. |
iterator erase(iterator first, iterator last) |
Sequence | Erases the range [first, last) |
void clear() |
Sequence | Erases all of the elements. |
void resize(n, t = T()) |
Sequence | Inserts or erases elements at the end such that the size becomes n. |
iterator insert_after(iterator pos) |
slist |
See below. |
iterator insert_after(iterator pos, const value_type& x) |
slist |
See below. |
template |
slist |
See below. |
void insert_after(iterator pos, size_type n, const value_type& x) |
slist |
See below. |
iterator erase_after(iterator pos) |
slist |
See below. |
iterator erase_after(iterator before_first, iterator last) |
slist |
See below. |
void splice(iterator position, slist& L) |
slist |
See below. |
void splice(iterator position, slist& L, iterator i) |
slist |
See below. |
void splice(iterator position, slist& L, iterator f, iterator l) |
slist |
See below. |
void splice_after(iterator pos, iterator prev) |
slist |
See below. |
void splice_after(iterator pos, iterator before_first, iterator before_last) |
slist |
See below. |
void remove(const T& value) |
slist |
See below. |
void unique() |
slist |
See below. |
void merge(slist& L) |
slist |
See below. |
void sort() |
slist |
See below. |
bool operator==(const slist&, const slist&) |
Forward Container | Tests two slists for equality. This is a global function, not a member function. |
bool operator<(const slist&, const slist&) |
Forward Container | Lexicographical comparison. This is a global function, not a member function. |