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

PrevUpHomeNext

Mutable buffer sequence requirements

A mutable buffer sequence represents a set of memory regions that may be used to receive the output of an operation, such as the receive operation of a socket.

A type X meets the MutableBufferSequence requirements if it satisfies the requirements of Destructible (C++Std [destructible]) and CopyConstructible (C++Std [copyconstructible]), as well as the additional requirements listed below.

In the table below, x denotes a (possibly const) value of type X, and u denotes an identifier.

Table 21. MutableBufferSequence requirements

expression

return type

assertion/note
pre/post-condition

boost::asio::buffer_sequence_begin(x)
boost::asio::buffer_sequence_end(x)

An iterator type meeting the requirements for bidirectional iterators (C++Std [bidirectional.iterators]) whose value type is convertible to mutable_buffer.

X u(x);

post:

equal(
  boost::asio::buffer_sequence_begin(x),
  boost::asio::buffer_sequence_end(x),
  boost::asio::buffer_sequence_begin(u),
  boost::asio::buffer_sequence_end(u),
  [](const mutable_buffer& b1,
     const mutable_buffer& b2)
   {
     return b1.data() == b2.data()
         && b1.size() == b2.size();
   })



PrevUpHomeNext