Public Types | |
typedef Allocator::reference | reference |
typedef Allocator::const_reference | const_reference |
typedef __gnu_debug::Safe_iterator< typename Base::iterator, list > | iterator |
typedef __gnu_debug::Safe_iterator< typename Base::const_iterator, list > | const_iterator |
typedef Base::size_type | size_type |
typedef Base::difference_type | difference_type |
typedef Type | value_type |
typedef Allocator | allocator_type |
typedef Allocator::pointer | pointer |
typedef Allocator::const_pointer | const_pointer |
typedef std::reverse_iterator< iterator > | reverse_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
list (const Allocator &a=Allocator()) | |
list (size_type n, const Type &value=Type(), const Allocator &a=Allocator()) | |
template<class InputIterator> | |
list (InputIterator first, InputIterator last, const Allocator &a=Allocator()) | |
list (const list &x) | |
list (const Base &x) | |
~list () | |
list & | operator= (const list &x) |
template<class InputIterator> | |
void | assign (InputIterator first, InputIterator last) |
Assigns a range to a list. | |
void | assign (size_type n, const Type &__t) |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
void | resize (size_type sz, Type c=Type()) |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
void | pop_front () |
Removes first element. | |
void | pop_back () |
Removes last element. | |
iterator | insert (iterator position, const Type &x) |
void | insert (iterator position, size_type n, const Type &x) |
template<class InputIterator> | |
void | insert (iterator position, InputIterator first, InputIterator last) |
iterator | erase (iterator position) |
iterator | erase (iterator position, iterator last) |
void | swap (list &x) |
void | clear () |
void | splice (iterator position, list &x) |
void | splice (iterator position, list &x, iterator __i) |
void | splice (iterator position, list &x, iterator first, iterator last) |
void | remove (const Type &value) |
Remove all elements equal to value. | |
template<class Predicate> | |
void | remove_if (Predicate pred) |
Remove all elements satisfying a predicate. | |
void | unique () |
Remove consecutive duplicate elements. | |
template<class BinaryPredicate> | |
void | unique (BinaryPredicate __binary_pred) |
Remove consecutive elements satisfying a predicate. | |
void | merge (list &x) |
template<class Compare> | |
void | merge (list &x, Compare comp) |
void | sort () |
Sort the elements. | |
template<typename StrictWeakOrdering> | |
void | sort (StrictWeakOrdering pred) |
Sort the elements according to comparison function. | |
Base & | M_base () |
const Base & | M_base () const |
list (const allocator_type &a=allocator_type()) | |
Default constructor creates no elements. | |
list (size_type n, const value_type &value, const allocator_type &a=allocator_type()) | |
Create a list with copies of an exemplar element. | |
list (size_type n) | |
Create a list with default elements. | |
list (const list &x) | |
List copy constructor. | |
list (InputIterator first, InputIterator last, const allocator_type &a=allocator_type()) | |
Builds a list from a range. | |
void | assign (size_type n, const value_type &__val) |
Assigns a given value to a list. | |
allocator_type | get_allocator () const |
Get a copy of the memory allocation object. | |
bool | empty () const |
size_type | size () const |
size_type | max_size () const |
void | resize (size_type new_size, const value_type &x) |
Resizes the list to the specified number of elements. | |
void | resize (size_type new_size) |
Resizes the list to the specified number of elements. | |
void | push_front (const value_type &x) |
Add data to the front of the list. | |
void | push_back (const value_type &x) |
Add data to the end of the list. | |
iterator | insert (iterator position, const value_type &x) |
Inserts given value into list before specified iterator. | |
void | insert (iterator position, size_type n, const value_type &x) |
Inserts a number of copies of given data into the list. | |
void | insert (iterator position, InputIterator first, InputIterator last) |
Inserts a range into the list. | |
iterator | erase (iterator position) |
Remove element at given position. | |
iterator | erase (iterator first, iterator last) |
Remove a range of elements. | |
void | swap (list &x) |
Swaps data with another list. | |
void | splice (iterator position, list &x) |
Insert contents of another list. | |
void | splice (iterator position, list &, iterator __i) |
Insert element from another list. | |
void | splice (iterator position, list &, iterator first, iterator last) |
Insert range from another list. | |
void | merge (list &x) |
Merge sorted lists. | |
void | merge (list &, StrictWeakOrdering) |
Merge sorted lists according to comparison function. | |
void | reverse () |
Reverse the elements in list. | |
void | M_invalidate_if (Predicate pred) |
void | M_transfer_iter (const Safe_iterator< Iterator, list< Type, Allocator > > &x) |
void | M_invalidate_all () const |
Public Attributes | |
Safe_iterator_base * | M_iterators |
The list of mutable iterators that reference this container. | |
Safe_iterator_base * | M_const_iterators |
The list of constant iterators that reference this container. | |
unsigned int | M_version |
The container version number. This number may never be 0. | |
Protected Types | |
typedef List_node< Type > | Node |
typedef Allocator::template rebind< List_node< Type > >::other | NodeAlloc_type |
Protected Member Functions | |
Node * | M_create_node (const value_type &x) |
Node * | M_create_node () |
void | M_assign_dispatch (Integer n, Integer __val, __true_type) |
void | M_insert_dispatch (iterator position, Integer n, Integer x, __true_type) |
void | M_insert_dispatch (iterator position, InputIterator first, InputIterator last, __false_type) |
void | M_fill_insert (iterator position, size_type n, const value_type &x) |
void | M_transfer (iterator position, iterator first, iterator last) |
void | M_insert (iterator position, const value_type &x) |
void | M_erase (iterator position) |
List_node< Type > * | M_get_node () |
void | M_put_node (List_node< Type > *__p) |
List_base (const allocator_type &a) | |
void | M_init () |
void | M_detach_all () |
void | M_detach_singular () |
void | M_revalidate_singular () |
void | M_swap (Safe_sequence_base &x) |
Protected Attributes | |
List_impl | M_impl |
Private Types | |
typedef std::list< Type, Allocator > | Base |
typedef __gnu_debug::Safe_sequence< list > | Safe_base |
Private Member Functions | |
void | M_invalidate_all () |
Definition at line 42 of file debug/list.
|
Assigns a given value to a list.
Definition at line 564 of file stl_list.h. |
|
Assigns a range to a list.
Note that the assignment completely changes the list and that the resulting list's size is the same as the number of elements assigned. Old data may be lost. Reimplemented from std::list< Type, Allocator >. Definition at line 99 of file debug/list. |
|
Returns a read-only (constant) reference to the data at the last element of the list. Reimplemented from std::list< Type, Allocator >. Definition at line 204 of file debug/list. |
|
Returns a read/write reference to the data at the last element of the list. Reimplemented from std::list< Type, Allocator >. Definition at line 197 of file debug/list. |
|
Returns a read-only (constant) iterator that points to the first element in the list. Iteration is done in ordinary element order. Reimplemented from std::list< Type, Allocator >. Definition at line 121 of file debug/list. |
|
Returns a read/write iterator that points to the first element in the list. Iteration is done in ordinary element order. Reimplemented from std::list< Type, Allocator >. Definition at line 117 of file debug/list. Referenced by __gnu_debug_def::list< Type, Allocator >::merge(), __gnu_debug_def::list< Type, Allocator >::pop_front(), __gnu_debug_def::list< Type, Allocator >::remove(), __gnu_debug_def::list< Type, Allocator >::remove_if(), __gnu_debug_def::list< Type, Allocator >::rend(), __gnu_debug_def::list< Type, Allocator >::resize(), __gnu_debug_def::list< Type, Allocator >::splice(), and __gnu_debug_def::list< Type, Allocator >::unique(). |
|
Erases all the elements. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty. Reimplemented from std::list< Type, Allocator >. Definition at line 288 of file debug/list. |
|
Returns true if the list is empty. (Thus begin() would equal end().) Definition at line 670 of file stl_list.h. |
|
Returns a read-only (constant) iterator that points one past the last element in the list. Iteration is done in ordinary element order. Reimplemented from std::list< Type, Allocator >. Definition at line 129 of file debug/list. |
|
Returns a read/write iterator that points one past the last element in the list. Iteration is done in ordinary element order. Reimplemented from std::list< Type, Allocator >. Definition at line 125 of file debug/list. Referenced by __gnu_debug_def::list< Type, Allocator >::M_invalidate_all(), __gnu_debug_def::list< Type, Allocator >::merge(), __gnu_debug_def::list< Type, Allocator >::pop_back(), __gnu_debug_def::list< Type, Allocator >::rbegin(), __gnu_debug_def::list< Type, Allocator >::resize(), __gnu_debug_def::list< Type, Allocator >::splice(), and __gnu_debug_def::list< Type, Allocator >::unique(). |
|
Remove a range of elements.
Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed. The user is also cautioned that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty. Definition at line 895 of file stl_list.h. |
|
Remove element at given position.
Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed. The user is also cautioned that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty. |
|
Returns a read-only (constant) reference to the data at the first element of the list. Reimplemented from std::list< Type, Allocator >. Definition at line 190 of file debug/list. |
|
Returns a read/write reference to the data at the first element of the list. Reimplemented from std::list< Type, Allocator >. Definition at line 183 of file debug/list. |
|
Get a copy of the memory allocation object.
Reimplemented from std::List_base< Type, Allocator >. Definition at line 590 of file stl_list.h. Referenced by __gnu_debug_def::list< Type, Allocator >::splice(). |
|
Inserts a range into the list.
Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references. Definition at line 849 of file stl_list.h. |
|
Inserts a number of copies of given data into the list.
Due to the nature of a list this operation can be done in constant time, and does not invalidate iterators and references. Definition at line 830 of file stl_list.h. |
|
Inserts given value into list before specified iterator.
|
|
Builds a list from a range.
Definition at line 530 of file stl_list.h. |
|
List copy constructor.
Definition at line 511 of file stl_list.h. References std::list< Type, Alloc >::begin(), and std::list< Type, Alloc >::end(). |
|
Create a list with default elements.
Definition at line 500 of file stl_list.h. |
|
Create a list with copies of an exemplar element.
Definition at line 487 of file stl_list.h. |
|
Default constructor creates no elements.
Definition at line 477 of file stl_list.h. |
|
Detach all iterators, leaving them singular. |
|
Detach all singular iterators.
|
|
Invalidates all iterators. Definition at line 202 of file safe_base.h. |
|
Invalidates all iterators |
|
Revalidates all attached singular iterators. This method may be used to validate iterators that were invalidated before (but for some reasion, such as an exception, need to become valid again). |
|
Swap this sequence with the given sequence. This operation also swaps ownership of the iterators, so that when the operation is complete all iterators that originally referenced one container now reference the other container. Definition at line 172 of file debug.cc. References __gnu_debug::swap(). |
|
Transfers all iterators that reference this memory location to this sequence from whatever sequence they are attached to. |
|
Returns the size() of the largest possible list. Definition at line 680 of file stl_list.h. |
|
Merge sorted lists according to comparison function.
|
|
Merge sorted lists.
|
|
Removes last element. This is a typical stack operation. It shrinks the list by one. Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed. Note that no data is returned, and if the last element's data is needed, it should be retrieved before pop_back() is called. Reimplemented from std::list< Type, Allocator >. Definition at line 225 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::end(). |
|
Removes first element. This is a typical stack operation. It shrinks the list by one. Due to the nature of a list this operation can be done in constant time, and only invalidates iterators/references to the element being removed. Note that no data is returned, and if the first element's data is needed, it should be retrieved before pop_front() is called. Reimplemented from std::list< Type, Allocator >. Definition at line 214 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::begin(). |
|
Add data to the end of the list.
Definition at line 784 of file stl_list.h. |
|
Add data to the front of the list.
Definition at line 754 of file stl_list.h. |
|
Returns a read-only (constant) reverse iterator that points to the last element in the list. Iteration is done in reverse element order. Reimplemented from std::list< Type, Allocator >. Definition at line 137 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::end(). |
|
Returns a read/write reverse iterator that points to the last element in the list. Iteration is done in reverse element order. Reimplemented from std::list< Type, Allocator >. Definition at line 133 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::end(). |
|
Remove all elements equal to value.
Reimplemented from std::list< Type, Allocator >. Definition at line 355 of file debug/list. References __gnu_debug::Safe_iterator< Iterator, Sequence >::base(), __gnu_debug_def::list< Type, Allocator >::begin(), and __gnu_debug_def::list< Type, Allocator >::erase(). |
|
Remove all elements satisfying a predicate.
Reimplemented from std::list< Type, Allocator >. Definition at line 368 of file debug/list. References __gnu_debug::Safe_iterator< Iterator, Sequence >::base(), __gnu_debug_def::list< Type, Allocator >::begin(), and __gnu_debug_def::list< Type, Allocator >::erase(). |
|
Returns a read-only (constant) reverse iterator that points to one before the first element in the list. Iteration is done in reverse element order. Reimplemented from std::list< Type, Allocator >. Definition at line 145 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::begin(). |
|
Returns a read/write reverse iterator that points to one before the first element in the list. Iteration is done in reverse element order. Reimplemented from std::list< Type, Allocator >. Definition at line 141 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::begin(). |
|
Resizes the list to the specified number of elements.
Definition at line 706 of file stl_list.h. |
|
Resizes the list to the specified number of elements.
|
|
Reverse the elements in list. Reverse the order of elements in the list in linear time. Definition at line 1075 of file stl_list.h. |
|
Returns the number of elements in the list. Definition at line 675 of file stl_list.h. References std::distance(). |
|
Sort the elements according to comparison function. Sorts the elements of this list in NlogN time. Equivalent elements remain in list order. Reimplemented from std::list< Type, Allocator >. Definition at line 449 of file debug/list. References std::sort(). |
|
Sort the elements. Sorts the elements of this list in NlogN time. Equivalent elements remain in list order. Reimplemented from std::list< Type, Allocator >. Definition at line 445 of file debug/list. References std::sort(). |
|
Insert range from another list.
Undefined if position is in [first,last). Definition at line 977 of file stl_list.h. |
|
Insert element from another list.
Definition at line 955 of file stl_list.h. |
|
Insert contents of another list.
Definition at line 939 of file stl_list.h. References std::list< Type, Alloc >::begin(), std::list< Type, Alloc >::empty(), and std::list< Type, Alloc >::end(). |
|
Swaps data with another list.
Definition at line 912 of file stl_list.h. References std::swap(). |
|
Remove consecutive elements satisfying a predicate.
Reimplemented from std::list< Type, Allocator >. Definition at line 399 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::begin(), __gnu_debug_def::list< Type, Allocator >::end(), and __gnu_debug_def::list< Type, Allocator >::erase(). |
|
Remove consecutive duplicate elements. For each consecutive set of elements with the same value, remove all but the first one. Remaining elements stay in list order. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibilty. Reimplemented from std::list< Type, Allocator >. Definition at line 380 of file debug/list. References __gnu_debug_def::list< Type, Allocator >::begin(), __gnu_debug_def::list< Type, Allocator >::end(), and __gnu_debug_def::list< Type, Allocator >::erase(). |
|
The list of constant iterators that reference this container.
Definition at line 156 of file safe_base.h. |
|
The list of mutable iterators that reference this container.
Definition at line 153 of file safe_base.h. |
|
The container version number. This number may never be 0.
Definition at line 159 of file safe_base.h. |