[#bsl-list-054] = xref:bsl.adoc[bsl]::list :relfileprefix: ../ :mrdocs: Forward declaration required by `List_NodeProctor`. == Synopsis Declared in `<bslstl_list.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class LIST_VALUE, class LIST_ALLOCATOR = xref:bsl/allocator-0df.adoc[bsl::allocator<VALUE>]> class list; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/list-054/allocator_type.adoc[`allocator_type`] | Allocator type used by this list. | xref:bsl/list-054/const_iterator.adoc[`const_iterator`] | Iterator providing non‐modifiable access to elements in this list. | xref:bsl/list-054/const_pointer.adoc[`const_pointer`] | Pointer to a non‐modifiable element in this list. | xref:bsl/list-054/const_reference.adoc[`const_reference`] | Reference to a non‐modifiable element stored in this list. | xref:bsl/list-054/const_reverse_iterator.adoc[`const_reverse_iterator`] | Reverse iterator over non‐modifiable list elements. | xref:bsl/list-054/difference_type.adoc[`difference_type`] | Signed integral type used to express distances between iterators. | xref:bsl/list-054/iterator.adoc[`iterator`] | Iterator providing modifiable access to elements in this list. | xref:bsl/list-054/pointer.adoc[`pointer`] | Pointer to a modifiable element in this list. | xref:bsl/list-054/reference.adoc[`reference`] | Reference to an element stored in this list. | xref:bsl/list-054/reverse_iterator.adoc[`reverse_iterator`] | Reverse iterator over modifiable list elements. | xref:bsl/list-054/size_type.adoc[`size_type`] | Unsigned integral type large enough to hold any valid element count. | xref:bsl/list-054/value_type.adoc[`value_type`] | Type of the elements stored in this list. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/list-054/2constructor-028.adoc[`list`] [.small]#[constructor]# | Constructors | xref:bsl/list-054/2destructor.adoc[`~list`] [.small]#[destructor]# | Destroy this list by calling the destructor for each element and deallocating all allocated storage. | xref:bsl/list-054/operator_assign-03.adoc[`operator=`] | Assignment operators | xref:bsl/list-054/append_range.adoc[`append_range`] | Append to the end of this object the elements of the specified `range`. | xref:bsl/list-054/assign-089.adoc[`assign`] | `assign` overloads | xref:bsl/list-054/assign_range.adoc[`assign_range`] | Assign to this object the elements of the specified `range`. | xref:bsl/list-054/back-0b.adoc[`back`] | `back` overloads | xref:bsl/list-054/begin-0d.adoc[`begin`] | `begin` overloads | xref:bsl/list-054/cbegin.adoc[`cbegin`] | Return a const iterator to the first element, or `end` if empty. | xref:bsl/list-054/cend.adoc[`cend`] | Return the past‐the‐end (forward) iterator providing non‐modifiable access to this list. | xref:bsl/list-054/clear.adoc[`clear`] | Remove all the elements from this list. | xref:bsl/list-054/crbegin.adoc[`crbegin`] | Return a reverse iterator providing non‐modifiable access to the last element in this list, and the past‐the‐end reverse iterator if this list is empty. | xref:bsl/list-054/crend.adoc[`crend`] | Return a const reverse iterator to the reverse end of this list. | xref:bsl/list-054/emplace.adoc[`emplace`] | Insert a newly constructed `value_type` at the specified `position`. | xref:bsl/list-054/emplace_back.adoc[`emplace_back`] | Append a newly constructed `value_type` object to the back of this list. | xref:bsl/list-054/emplace_front.adoc[`emplace_front`] | Prepend a newly constructed `value_type` object to the front of this list. | xref:bsl/list-054/empty.adoc[`empty`] | Return `true` if this list has no elements, and `false` otherwise. | xref:bsl/list-054/end-04.adoc[`end`] | `end` overloads | xref:bsl/list-054/erase-0e.adoc[`erase`] | `erase` overloads | xref:bsl/list-054/front-08.adoc[`front`] | `front` overloads | xref:bsl/list-054/get_allocator.adoc[`get_allocator`] | Return a copy of the allocator used for memory allocation by this list. | xref:bsl/list-054/insert-0a5.adoc[`insert`] | `insert` overloads | xref:bsl/list-054/insert_range.adoc[`insert_range`] | Insert the elements of `range` at the specified `position`. | xref:bsl/list-054/max_size.adoc[`max_size`] | Return an upper bound on the largest number of elements this list can hold. | xref:bsl/list-054/merge-076.adoc[`merge`] | `merge` overloads | xref:bsl/list-054/pop_back.adoc[`pop_back`] | Remove and destroy the last element of this list. The behavior is undefined unless this list contains at least one element. | xref:bsl/list-054/pop_front.adoc[`pop_front`] | Remove and destroy the first element of this list. The behavior is undefined unless this list contains at least one element. | xref:bsl/list-054/prepend_range.adoc[`prepend_range`] | Prepend to the front of this object the elements of the specified `range`. | xref:bsl/list-054/push_back-0f.adoc[`push_back`] | `push_back` overloads | xref:bsl/list-054/push_front-03.adoc[`push_front`] | `push_front` overloads | xref:bsl/list-054/rbegin-01.adoc[`rbegin`] | `rbegin` overloads | xref:bsl/list-054/remove.adoc[`remove`] | Erase all elements equal to `value` and return how many were erased. | xref:bsl/list-054/remove_if.adoc[`remove_if`] | Erase all elements for which `predicate` is true; return the count. | xref:bsl/list-054/rend-0d.adoc[`rend`] | `rend` overloads | xref:bsl/list-054/resize-09.adoc[`resize`] | `resize` overloads | xref:bsl/list-054/reverse.adoc[`reverse`] | Reverse the order of the elements in this list. | xref:bsl/list-054/size.adoc[`size`] | Return the number of elements in this list. | xref:bsl/list-054/sort-08.adoc[`sort`] | `sort` overloads | xref:bsl/list-054/splice-0a6.adoc[`splice`] | `splice` overloads | xref:bsl/list-054/swap.adoc[`swap`] | Exchange the value of this object with that of the specified `other`. | xref:bsl/list-054/unique-0d.adoc[`unique`] | `unique` overloads |=== == Deduction Guides [cols="1,4"] |=== | Name| Description | xref:bsl/list-08.adoc[`list<VALUE>`] | Deduce `VALUE` from the value type of the iterator range constructor. | xref:bsl/list-0a.adoc[`list<VALUE>`] | Deduce `VALUE` from an initializer_list when an allocator pointer is given. | xref:bsl/list-01.adoc[`list<VALUE>`] | Deduce `VALUE` from iterators when an allocator pointer is supplied. | xref:bsl/list-05c.adoc[`list<VALUE>`] | Deduce `VALUE` from the fill constructor's value argument. | xref:bsl/list-00.adoc[`list<VALUE, ALLOCATOR>`] | Deduce `VALUE` and `ALLOCATOR` from the iterator‐range constructor. | xref:bsl/list-06.adoc[`list<ranges::range_value_t<t_RANGE>, t_ALLOCATOR>`] | Deduce the template parameters `VALUE_TYPE` and `ALLOCATOR` from the parameters supplied to the constructor of `list`. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:bsl/List_NodeProctor.adoc[bsl::List_NodeProctor]` | This class provides a proctor to free a node containing an uninitialized `VALUE` object in the event that an exception is thrown. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/erase-086.adoc[`erase`] | Erase all elements in `l` that compare equal to `value`. | xref:bsl/erase_if-076.adoc[`erase_if`] | Erase all elements in `l` that satisfy the specified `predicate`. | xref:bsl/operator_3way-0f6.adoc[`operator<=>`] | Perform a lexicographic three‐way comparison of `lhs` and `rhs`. | xref:bsl/operator_eq-0b6.adoc[`operator==`] | Return `true` if `lhs` and `rhs` have the same value, and `false` otherwise. | xref:bsl/swap-06d9.adoc[`swap`] | Exchange the values of the specified `a` and `b` lists. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#