]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/vmd/doc/vmd_conv17to18.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / vmd / doc / vmd_conv17to18.qbk
CommitLineData
7c673cae
FG
1[/
2 (C) Copyright Edward Diener 2011-2015
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[section:vmd_conv Version 1.7 to 1.8 conversion]
9
10Since the current version of VMD has been drastically changed
11to make it easier to use VMD functionality this section
12details equivalent functionality for previous version 1.7
13VMD macros.
14
15The changes in functionality involve the parsing of sequences.
16The equivalent to all the V1.7 functionality, which looks for
17various data types at the beginning of a sequence, is encompassed
18by the V1.8 macro BOOST_VMD_ELEM(0,sequence,...), where '0' is the first
19sequence element and 'sequence' is the sequence, with its optional
20parameters.
21
22[heading Identifier]
23
24V1.7
25
26BOOST_VMD_IDENTIFIER(sequence,keys,...) looked for an identifier at
27the beginning of a sequence and returned a 2-element tuple, where the first
28element is the matching index starting with 1, or 0 if no identifier is found,
29and the second tuple element is the rest of the sequence or emptiness if no
30identifier is found.
31
32V1.8 equivalent
33
34BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER,BOOST_VMD_RETURN_AFTER,BOOST_VMD_RETURN_INDEX)
35returns a 3-element tuple where the identifier found is the first tuple element,
36the rest of the sequence is the second tuple element, and the matching index, starting with
370, is the 3rd tuple element. If no identifier is found all elements of the returned tuple are empty.
38
39V1.7
40
41BOOST_VMD_BEGIN_IDENTIFIER(sequence,keys,...) looked for an identifier at
42the beginning of a sequence and returned the matching index starting with 1, or
430 if no identifier is found.
44
45V1.8 equivalent
46
47BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER,BOOST_VMD_RETURN_INDEX)
48returns a 2-element tuple where the identifier found is the first tuple element
49and the matching index, starting with 0, is the 2nd tuple element. If no identifier
50is found both elements of the returned tuple are empty.
51
52V1.7
53
54BOOST_VMD_AFTER_IDENTIFIER(sequence,keys,...) looked for an identifier at the
55beginning of a sequence and returned the rest of the sequence or emptiness if
56no identifier is found.
57
58V1.8 equivalent
59
60BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER,BOOST_VMD_RETURN_ONLY_AFTER)
61is the exact equivalent.
62
63V1.7
64
65BOOST_VMD_IS_BEGIN_IDENTIFIER(sequence,keys,...) returns 1 if input
66begins with an identifier, else 0 if it does not.
67
68V1.8 equivalent
69
70BOOST_VMD_ELEM(0,sequence,(identifiers),BOOST_VMD_TYPE_IDENTIFIER) returns the identifier found,
71otherwise emptiness if not found. You can use
72BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,identifiers,BOOST_VMD_TYPE_IDENTIFIER)))
73as the exact equivalent.
74
75[heading Number]
76
77V1.7
78
79BOOST_VMD_NUMBER(sequence,...) looked for a number at
80the beginning of a sequence and returned a 2-element tuple, where the first
81element is the number and the second tuple element is the rest of the sequence.
82If no number is found both tuple elements are empty.
83
84V1.8 equivalent
85
86BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER,BOOST_VMD_RETURN_AFTER)
87is the exact equivalent.
88
89V1.7
90
91BOOST_VMD_BEGIN_NUMBER(sequence,...) looked for a number at
92the beginning of a sequence and returned the number if found or emptiness
93if no number is found.
94
95V1.8 equivalent
96
97BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER)
98is the exact equivalent.
99
100V1.7
101
102BOOST_VMD_AFTER_NUMBER(sequence,...) looked for a number at the
103beginning of a sequence and returned the rest of the sequence or emptiness if
104no number is found.
105
106V1.8 equivalent
107
108BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER,BOOST_VMD_RETURN_ONLY_AFTER)
109is the exact equivalent.
110
111V1.7
112
113BOOST_VMD_IS_BEGIN_NUMBER(sequence,...) returns 1 if input
114begins with a number, else 0 if it does not.
115
116V1.8 equivalent
117
118BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER) returns the number found,
119otherwise emptiness if not found. You can use
120BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_NUMBER)))
121as the exact equivalent.
122
123[heading Array]
124
125V1.7
126
127BOOST_VMD_ARRAY(sequence) looked for an array at
128the beginning of a sequence and returned a 2-element tuple, where the first
129element is the array and the second tuple element is the rest of the sequence.
130If no array is found both tuple elements are empty.
131
132V1.8 equivalent
133
134BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY,BOOST_VMD_RETURN_AFTER)
135is the exact equivalent.
136
137V1.7
138
139BOOST_VMD_BEGIN_ARRAY(sequence) looked for an array at
140the beginning of a sequence and returned the array if found or emptiness
141if no array is found.
142
143V1.8 equivalent
144
145BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY)
146is the exact equivalent.
147
148V1.7
149
150BOOST_VMD_AFTER_ARRAY(sequence) looked for an array at the
151beginning of a sequence and returned the rest of the sequence or emptiness if
152no array is found.
153
154V1.8 equivalent
155
156BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY,BOOST_VMD_RETURN_ONLY_AFTER)
157is the exact equivalent.
158
159V1.7
160
161BOOST_VMD_IS_BEGIN_ARRAY(sequence,...) returns 1 if input
162begins with an array, else 0 if it does not.
163
164V1.8 equivalent
165
166BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY) returns the array found,
167otherwise emptiness if not found. You can use
168BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_ARRAY)))
169as the exact equivalent.
170
171[heading List]
172
173V1.7
174
175BOOST_VMD_LIST(sequence) looked for an list at
176the beginning of a sequence and returned a 2-element tuple, where the first
177element is the list and the second tuple element is the rest of the sequence.
178If no list is found both tuple elements are empty.
179
180V1.8 equivalent
181
182BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST,BOOST_VMD_RETURN_AFTER)
183is the exact equivalent.
184
185V1.7
186
187BOOST_VMD_BEGIN_LIST(sequence) looked for a list at
188the beginning of a sequence and returned the list if found or emptiness
189if no list is found.
190
191V1.8 equivalent
192
193BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST) is the exact equivalent.
194
195V1.7
196
197BOOST_VMD_AFTER_LIST(sequence) looked for an list at the
198beginning of a sequence and returned the rest of the sequence or emptiness if
199no list is found.
200
201V1.8 equivalent
202
203BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST,BOOST_VMD_RETURN_ONLY_AFTER)
204is the exact equivalent.
205
206V1.7
207
208BOOST_VMD_IS_BEGIN_LIST(sequence,...) returns 1 if input
209begins with an list, else 0 if it does not.
210
211V1.8 equivalent
212
213BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST) returns the list found,
214otherwise emptiness if not found. You can use
215BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_LIST)))
216as the exact equivalent.
217
218[heading Seq]
219
220V1.7
221
222BOOST_VMD_SEQ(sequence) looked for a seq at
223the beginning of a sequence and returned a 2-element tuple, where the first
224element is the seq and the second tuple element is the rest of the sequence.
225If no seq is found both tuple elements are empty.
226
227V1.8 equivalent
228
229BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ,BOOST_VMD_RETURN_AFTER)
230is the exact equivalent.
231
232V1.7
233
234BOOST_VMD_BEGIN_SEQ(sequence) looked for a seq at
235the beginning of a sequence and returned the seq if found or emptiness
236if no seq is found.
237
238V1.8 equivalent
239
240BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ) is the exact equivalent.
241
242V1.7
243
244BOOST_VMD_AFTER_SEQ(sequence) looked for an seq at the
245beginning of a sequence and returned the rest of the sequence or emptiness if
246no seq is found.
247
248V1.8 equivalent
249
250BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ,BOOST_VMD_RETURN_ONLY_AFTER)
251is the exact equivalent.
252
253V1.7
254
255BOOST_VMD_IS_BEGIN_SEQ(sequence,...) returns 1 if input
256begins with an seq, else 0 if it does not.
257
258V1.8 equivalent
259
260BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ) returns the seq found,
261otherwise emptiness if not found. You can use
262BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_SEQ)))
263as the exact equivalent.
264
265[heading Tuple]
266
267V1.7
268
269BOOST_VMD_TUPLE(sequence) looked for an tuple at
270the beginning of a sequence and returned a 2-element tuple, where the first
271element is the tuple and the second tuple element is the rest of the sequence.
272If no tuple is found both tuple elements are empty.
273
274V1.8 equivalent
275
276BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE,BOOST_VMD_RETURN_AFTER)
277is the exact equivalent.
278
279V1.7
280
281BOOST_VMD_BEGIN_TUPLE(sequence) looked for a tuple at
282the beginning of a sequence and returned the tuple if found or emptiness
283if no tuple is found.
284
285V1.8 equivalent
286
287BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE) is the exact equivalent.
288
289V1.7
290
291BOOST_VMD_AFTER_TUPLE(sequence) looked for an tuple at the
292beginning of a sequence and returned the rest of the sequence or emptiness if
293no tuple is found.
294
295V1.8 equivalent
296
297BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE,BOOST_VMD_RETURN_ONLY_AFTER)
298is the exact equivalent.
299
300V1.7
301
302BOOST_VMD_IS_BEGIN_TUPLE(sequence,...) returns 1 if input
303begins with an tuple, else 0 if it does not.
304
305V1.8 equivalent
306
307BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE) returns the tuple found,
308otherwise emptiness if not found. You can use
309BOOST_PP_COMPL(BOOST_VMD_IS_EMPTY(BOOST_VMD_ELEM(0,sequence,BOOST_VMD_TYPE_TUPLE)))
310as the exact equivalent.
311
312[endsect]