...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A flat DynamicBuffer with a fixed size internal buffer.
Defined in header <boost/beast/core/flat_static_buffer.hpp>
class flat_static_buffer_base
Name |
Description |
---|---|
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 |
---|---|
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. |
|
Constructor. |
|
Return the maximum sum of the input and output sequence sizes. |
|
Get a list of buffers that represent the output sequence, with the given size. |
|
Set the input and output sequences to size 0. |
|
Return the size of the input sequence. |
Name |
Description |
---|---|
Constructor. |
|
Reset the pointed-to buffer. |
Buffer sequences returned by flat_static_buffer::data
and flat_static_buffer::prepare
will always be of length
one. Ownership of the underlying storage belongs to the derived class.
Variables are usually declared using the template class flat_static_buffer
; however, to
reduce the number of instantiations of template functions receiving static
stream buffer arguments in a deduced context, the signature of the receiving
function should use flat_static_buffer_base
.
When used with flat_static_buffer
this implements
a dynamic buffer using no memory allocations.
Convenience header <boost/beast/core.hpp>