]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/asio/doc/requirements/ConvertibleToMutableBuffer.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / asio / doc / requirements / ConvertibleToMutableBuffer.qbk
1 [/
2 / Copyright (c) 2003-2016 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:ConvertibleToMutableBuffer Convertible to mutable buffer requirements]
9
10 A type that meets the requirements for convertibility to a mutable buffer must
11 meet the requirements of `CopyConstructible` types (C++ Std, 20.1.3), and the
12 requirements of `Assignable` types (C++ Std, 23.1).
13
14 In the table below, `X` denotes a class meeting the requirements for
15 convertibility to a mutable buffer, `a` and `b` denote values of type `X`, and
16 `u`, `v` and `w` denote identifiers.
17
18 [table ConvertibleToMutableBuffer requirements
19 [[expression][postcondition]]
20 [
21 [``
22 mutable_buffer u(a);
23 mutable_buffer v(a);
24 ``]
25 [``
26 buffer_cast<void*>(u) == buffer_cast<void*>(v)
27 && buffer_size(u) == buffer_size(v)
28 ``]
29 ]
30 [
31 [``
32 mutable_buffer u(a);
33 mutable_buffer v = a;
34 ``]
35 [``
36 buffer_cast<void*>(u) == buffer_cast<void*>(v)
37 && buffer_size(u) == buffer_size(v)
38 ``]
39 ]
40 [
41 [``
42 mutable_buffer u(a);
43 mutable_buffer v; v = a;
44 ``]
45 [``
46 buffer_cast<void*>(u) == buffer_cast<void*>(v)
47 && buffer_size(u) == buffer_size(v)
48 ``]
49 ]
50 [
51 [``
52 mutable_buffer u(a);
53 const X& v = a;
54 mutable_buffer w(v);
55 ``]
56 [``
57 buffer_cast<void*>(u) == buffer_cast<void*>(w)
58 && buffer_size(u) == buffer_size(w)
59 ``]
60 ]
61 [
62 [``
63 mutable_buffer u(a);
64 X v(a);
65 mutable_buffer w(v);
66 ``]
67 [``
68 buffer_cast<void*>(u) == buffer_cast<void*>(w)
69 && buffer_size(u) == buffer_size(w)
70 ``]
71 ]
72 [
73 [``
74 mutable_buffer u(a);
75 X v = a;
76 mutable_buffer w(v);
77 ``]
78 [``
79 buffer_cast<void*>(u) == buffer_cast<void*>(w)
80 && buffer_size(u) == buffer_size(w)
81 ``]
82 ]
83 [
84 [``
85 mutable_buffer u(a);
86 X v(b); v = a;
87 mutable_buffer w(v);
88 ``]
89 [``
90 buffer_cast<void*>(u) == buffer_cast<void*>(w)
91 && buffer_size(u) == buffer_size(w)
92 ``]
93 ]
94 ]
95
96 [endsect]