This calls the removed element's destructor.
Parameters
noneReturn value
noneExample
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Output:
Popping out the elements in mylist: 100 200 300 Final size of mylist is 0 |
Complexity
Constant.See also
| list::pop_back | Delete last element (public member function) |
| list::push_front | Insert element at beginning (public member function) |
| list::erase | Erase elements (public member function) |
