Here is the list of functions provided by the header file: It’s value-dependent and uses a simple memory allocation model.
This uses the allocator class template by default. You can substitute T by any data type, even user-defined types. Here is a description of the above parameters: To define the std::list, we have to import the header file. An internal allocator automatically fulfills the storage requirements. The std::list can expand and shrink from both ends as needed during runtime. The information needed for sequential access to data is stored in a container. You can scatter list elements in different memory chunks. The Standard Template Library list doesn’t support fast random access, but it supports sequential access from all directions. This means list data can be accessed bi-directionally and sequentially. The std::list is implemented as a doubly-linked list. The std:list allows you to insert and remove items from anywhere. In C++, the std::list refers to a storage container.