| Home | Libraries | People | FAQ | More

#### flat_static_buffer

A DynamicBuffer with a fixed size internal buffer.

##### Synopsis

Defined in header `<boost/beast/core/flat_static_buffer.hpp>`

    template<
        std::size_t N>
    class flat_static_buffer :
        public flat_static_buffer_base

##### Types

Name | Description
--- | ---
const_buffers_type | The ConstBufferSequence used to represent the readable bytes.
mutable_buffers_type | The MutableBufferSequence used to represent the writable bytes.
mutable_data_type | The MutableBufferSequence used to represent the readable bytes.

##### Member Functions

Name | Description
--- | ---
base | Returns the flat_static_buffer_base portion of this object.
capacity | Return the maximum sum of input and output sizes that can be held without an allocation.
cdata | Returns a constant buffer sequence representing the readable bytes.
clear | Clear the readable and writable bytes to zero.
commit | Append writable bytes to the readable bytes.
consume | Remove bytes from beginning of the readable bytes.
data | Returns a constant buffer sequence representing the readable bytes. Returns a mutable buffer sequence representing the readable bytes.
flat_static_buffer | Constructor.
max_size | Return the maximum sum of the input and output sequence sizes.
operator= | Assignment.
prepare | Returns a mutable buffer sequence representing writable bytes.
size | Returns the number of readable bytes.

##### Protected Member Functions

Name | Description
--- | ---
reset | Reset the pointed-to buffer.

##### Description

Buffer sequences returned by `flat_static_buffer::data` and `flat_static_buffer::prepare` will always be of length one. This implements a dynamic buffer using no memory allocations.

##### Template Parameters

Type | Description
--- | ---
`N` | The number of bytes in the internal buffer.

##### Remarks

To reduce the number of template instantiations when passing objects of this type in a deduced context, the signature of the receiving function should use `flat_static_buffer_base` instead.

##### See Also

`flat_static_buffer_base`

Convenience header `<boost/beast/core.hpp>`