Template:cpp/container/clear

Erases all elements from the container.

Invalidates any references, pointers, or iterators referring to contained elements.

Parameters
(none)

Return value
(none)

Complexity
Linear in the size of the container, i.e., the number of elements.