| Home | Libraries | People | FAQ | More

##### basic_flat_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` or `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.

###### Exception Safety

Basic guarantee.

###### Exceptions

Type | Thrown On
--- | ---
`std::length_error` | if n is larger than the maximum allocation size of the allocator.