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

dynamic_vector_buffer::prepare

Get a list of buffers that represents the output sequence, with the given size.

mutable_buffers_type prepare(
    std::size_t n);

Ensures that the output sequence can accommodate n bytes, resizing the basic_string object as necessary.

Return Value

An object of type mutable_buffers_type that satisfies MutableBufferSequence requirements, representing basic_string memory at the start of the output sequence of size n.

Exceptions

std::length_error

If size() + n > max_size().

Remarks

The returned object is invalidated by any dynamic_vector_buffer or basic_string member function that modifies the input sequence or output sequence.


PrevUpHomeNext