2 / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
8 [section:ConstBufferSequence Constant buffer sequence requirements]
10 In the table below, `X` denotes a class containing objects of type `T`, `a`
11 denotes a value of type `X` and `u` denotes an identifier.
13 [table ConstBufferSequence requirements
14 [[expression] [return type] [assertion/note\npre/post-condition]]
18 [`T` meets the requirements for [link
19 boost_asio.reference.ConvertibleToConstBuffer
20 ConvertibleToConstBuffer].]
24 [iterator type pointing to `T`]
25 [`const_iterator` meets the requirements for bidirectional iterators
31 [post: `equal_const_buffer_seq(a, X(a))` where the binary predicate
32 `equal_const_buffer_seq` is defined as
34 bool equal_const_buffer_seq(
35 const X& x1, const X& x2)
38 distance(x1.begin(), x1.end())
39 == distance(x2.begin(), x2.end())
40 && equal(x1.begin(), x1.end(),
41 x2.begin(), equal_buffer);
44 and the binary predicate `equal_buffer` is defined as
47 const X::value_type& v1,
48 const X::value_type& v2)
53 buffer_cast<const void*>(b1)
54 == buffer_cast<const void*>(b2)
55 && buffer_size(b1) == buffer_size(b2);
64 distance(a.begin(), a.end())
65 == distance(u.begin(), u.end())
66 && equal(a.begin(), a.end(),
67 u.begin(), equal_buffer)
69 where the binary predicate `equal_buffer` is defined as
72 const X::value_type& v1,
73 const X::value_type& v2)
78 buffer_cast<const void*>(b1)
79 == buffer_cast<const void*>(b2)
80 && buffer_size(b1) == buffer_size(b2);
87 [note: the destructor is applied to every element of `a`; all the memory
92 [`const_iterator` or convertible to `const_iterator`]
97 [`const_iterator` or convertible to `const_iterator`]