...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A linear dynamic buffer.
Defined in header <boost/beast/core/flat_buffer.hpp>
template< class Allocator> class basic_flat_buffer
Name |
Description |
---|---|
The type of allocator used. |
|
The type used to represent the input sequence as a list of buffers. |
|
The type used to represent the output sequence as a list of buffers. |
Name |
Description |
---|---|
Constructor. |
|
Return the maximum sum of input and output sizes that can be held without an allocation. |
|
Move bytes from the output sequence to the input sequence. |
|
Remove bytes from the input sequence. |
|
Get a list of buffers that represent the input sequence. |
|
Returns a copy of the associated allocator. |
|
Return the maximum sum of the input and output sequence sizes. |
|
Assignment. Copy assignment. |
|
Get a list of buffers that represent the output sequence, with the given size. |
|
Reallocate the buffer to fit the input sequence. |
|
Returns the size of the input sequence. |
|
Destructor. |
Name |
Description |
---|---|
Exchange two flat buffers. |
Objects of this type meet the requirements of DynamicBuffer and offer additional invariants:
basic_flat_buffer::data
and basic_flat_buffer::prepare
will always be of length
one.
std::length_error
.
Upon construction, a maximum size for the buffer may be specified. If this
limit is exceeded, the std::length_error
exception will be thrown.
This class is designed for use with algorithms that take dynamic buffers as parameters, and are optimized for the case where the input sequence or output sequence is stored in a single contiguous buffer.
Convenience header <boost/beast/core.hpp>