1[/ 2 / Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) 3 / 4 / Distributed under the Boost Software License, Version 1.0. (See accompanying 5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 /] 7 8[section:ConstBufferSequence Constant buffer sequence requirements] 9 10A ['constant buffer sequence] represents a set of memory regions that may be 11used as input to an operation, such as the `send` operation of a socket. 12 13A type `X` meets the `ConstBufferSequence` requirements if it satisfies the 14requirements of `Destructible` (C++Std [destructible]) and 15`CopyConstructible` (C++Std [copyconstructible]), as well as the additional 16requirements listed below. 17 18In the table below, `x` denotes a (possibly const) value of type `X`, and `u` 19denotes an identifier. 20 21[table ConstBufferSequence requirements 22 [[expression] [return type] [assertion/note[br]pre/post-condition]] 23 [ 24 [`boost::asio::buffer_sequence_begin(x)`[br] 25 `boost::asio::buffer_sequence_end(x)`] 26 [An iterator type meeting the requirements for bidirectional iterators 27 (C++Std \[bidirectional.iterators\]) whose value type is convertible to 28 `const_buffer`.] 29 [] 30 ] 31 [ 32 [`` 33 X u(x); 34 ``] 35 [] 36 [post:[br] 37 `` 38 equal( 39 boost::asio::buffer_sequence_begin(x), 40 boost::asio::buffer_sequence_end(x), 41 boost::asio::buffer_sequence_begin(u), 42 boost::asio::buffer_sequence_end(u), 43 [](const const_buffer& b1, 44 const const_buffer& b2) 45 { 46 return b1.data() == b2.data() 47 && b1.size() == b2.size(); 48 }) 49 ``] 50 ] 51] 52 53[endsect] 54