The list sequence container (from header <list>) allows insertion and deletion operations at any location in the container. If most of the insertions and deletions occur at the ends of the container, the
deque data structure (Section 15.5.3) provides a more efficient implementation. Class template
list is implemented as a doubly linked list—every node in the
list contains a pointer to the previous node in the
list and to the next node in the
list. This enables class template
list to support bidirectional iterators that allow the container to be traversed both forward and backward. Any algorithm that requires input, output, forward or bidirectional iterators can operate on a
list member functions manipulate ...