Boost C++ Libraries

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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
basic_multi_buffer::reserve

Guarantee a minimum capacity.

Synopsis
void
reserve(
    std::size_t n);
Description

This function adjusts the internal storage (if necessary) to guarantee space for at least n bytes.

Buffer sequences previously obtained using data remain valid, while buffer sequences previously obtained using prepare become invalid.

Parameters

Name

Description

n

The minimum number of byte for the new capacity. If this value is greater than the maximum size, then the maximum size will be adjusted upwards to this value.

Exceptions

Type

Thrown On

std::length_error

if n is larger than the maximum allocation size of the allocator.

Exception Safety

Strong guarantee.


PrevUpHomeNext