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 an older version of Boost and was released in 2020. The current version is 1.90.0.
Return the total number of bytes in a buffer or buffer sequence.
Defined in header <boost/beast/core/buffer_traits.hpp>
template< class BufferSequence> std::size_t buffer_bytes( BufferSequence const& buffers);
This function returns the total number of bytes in a buffer, buffer sequence, or object convertible to a buffer. Specifically it may be passed:
net::const_buffer or net::mutable_buffer
net::const_buffer
This function is designed as an easier-to-use replacement for net::buffer_size.
It recognizes customization points found through argument-dependent lookup.
The call beast::buffer_bytes(b) is equivalent
to performing:
using net::buffer_size; return buffer_size(b);
In addition this handles types which are convertible to net::const_buffer;
these are not handled by net::buffer_size.
|
Name |
Description |
|---|---|
|
|
The buffer or buffer sequence to calculate the size of. |
The total number of bytes in the buffer or sequence.