chsvlib
chsv helper source code

◆ capacity()

std::size_t capacity ( ) const
noexcept

Returns the capacity of the vector, i.e. a number of elements the vector is capable of storing without any reallocations.

Returns
The current capacity.

The capacity is automatically adjusted when new elements are added to the vector. Also, the capacity can be enlarged beforehand with the reserve method and decreased with the shrink_to_fit method.

The capacity cannot be less than sbo_threshold.