In the table below, X
denotes
a class containing objects of type T
,
a
denotes a value of type
X
and u
denotes an identifier.
Table 20. MutableBufferSequence requirements
expression |
return type |
assertion/note |
---|---|---|
|
|
|
|
iterator type pointing to |
|
|
post: bool equal_mutable_buffer_seq( const X& x1, const X& x2) { return distance(x1.begin(), x1.end()) == distance(x2.begin(), x2.end()) && equal(x1.begin(), x1.end(), x2.begin(), equal_buffer); }
and the binary predicate bool equal_buffer( const X::value_type& v1, const X::value_type& v2) { mutable_buffer b1(v1); mutable_buffer b2(v2); return buffer_cast<const void*>(b1) == buffer_cast<const void*>(b2) && buffer_size(b1) == buffer_size(b2); }
|
|
|
post: distance(a.begin(), a.end()) == distance(u.begin(), u.end()) && equal(a.begin(), a.end(), u.begin(), equal_buffer)
where the binary predicate bool equal_buffer( const X::value_type& v1, const X::value_type& v2) { mutable_buffer b1(v1); mutable_buffer b2(v2); return buffer_cast<const void*>(b1) == buffer_cast<const void*>(b2) && buffer_size(b1) == buffer_size(b2); }
|
|
|
|
note: the destructor is applied to every element of |
|
|
|
|
|