Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards



DynamicBuffer_v2: Shrink the underlying memory by the specified number of bytes.

void shrink(
    std::size_t n);

Erases n bytes from the end of the vector by resizing the vector object. If n is greater than the current size of the vector, the vector is emptied.