C++ Standard Library C++ STL Library

C++ <deque> - ~deque() Function



The C++ deque::~deque function is used to destroy the deque. The destructors of the elements are called and the used storage is deallocated.

C++98: The deque is destroyed and the storage capacity of deque is deallocated using its allocator.

C++11: The allocator_traits::destroy is called on each element of the deque and the storage capacity of deque is deallocated using its allocator.

Note:: If the elements of the deque are pointers, the pointed-to objects are not destroyed.

Syntax

~deque();

Parameters

No parameter is required.

Return Value

None.

Time Complexity

Linear i.e, Θ(n).

Exceptions

Never throws exceptions.


❮ C++ <deque> Library