1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Chapter 1. The Variadic Macro Data Library 1.9</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="Chapter 1. The Variadic Macro Data Library 1.9"> 8<link rel="next" href="variadic_macro_data/vmd_naming.html" title="Naming conventions"> 9</head> 10<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 11<table cellpadding="2" width="100%"><tr> 12<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 13<td align="center"><a href="../../../../index.html">Home</a></td> 14<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 15<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 16<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 17<td align="center"><a href="../../../../more/index.htm">More</a></td> 18</tr></table> 19<hr> 20<div class="spirit-nav"><a accesskey="n" href="variadic_macro_data/vmd_naming.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div> 21<div class="chapter"> 22<div class="titlepage"><div> 23<div><h2 class="title"> 24<a name="variadic_macro_data"></a>Chapter 1. The Variadic Macro Data Library 1.9</h2></div> 25<div><div class="author"><h3 class="author"> 26<span class="firstname">Edward</span> <span class="surname">Diener</span> 27</h3></div></div> 28<div><p class="copyright">Copyright © 2010-2017 Tropic Software 29 East Inc</p></div> 30</div></div> 31<div class="toc"> 32<p><b>Table of Contents</b></p> 33<dl class="toc"> 34<dt><span class="section"><a href="index.html#variadic_macro_data.vmd_intro">Introduction</a></span></dt> 35<dt><span class="section"><a href="variadic_macro_data/vmd_naming.html">Naming conventions</a></span></dt> 36<dt><span class="section"><a href="variadic_macro_data/vmd_whyhow.html">Why and how to use</a></span></dt> 37<dt><span class="section"><a href="variadic_macro_data/vmd_vmacros.html">Using variadic macros</a></span></dt> 38<dt><span class="section"><a href="variadic_macro_data/vmd_vc.html">Visual C++ define</a></span></dt> 39<dt><span class="section"><a href="variadic_macro_data/vmd_detail.html">Functional groups</a></span></dt> 40<dt><span class="section"><a href="variadic_macro_data/vmd_data_types.html">Data types</a></span></dt> 41<dt><span class="section"><a href="variadic_macro_data/vmd_specific.html">Specific macros for working 42 with data types</a></span></dt> 43<dd><dl> 44<dt><span class="section"><a href="variadic_macro_data/vmd_specific.html#variadic_macro_data.vmd_specific.vmd_test_empty">Emptiness</a></span></dt> 45<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_constraints.html">Macro 46 constraints</a></span></dt> 47<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_identifier.html">Identifiers</a></span></dt> 48<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_number.html">Numbers</a></span></dt> 49<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_type.html">Types</a></span></dt> 50<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_pp_data_types.html">VMD 51 and Boost PP data types</a></span></dt> 52<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_identifying.html">Identifying 53 data types</a></span></dt> 54</dl></dd> 55<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html">Generic macros for working 56 with data types</a></span></dt> 57<dd><dl> 58<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html#variadic_macro_data.vmd_generic.vmd_sequence">Parsing 59 sequences</a></span></dt> 60<dd><dl> 61<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html#variadic_macro_data.vmd_generic.vmd_sequence.vmd_sequence_convert">Converting 62 sequences</a></span></dt> 63<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html#variadic_macro_data.vmd_generic.vmd_sequence.vmd_sequence_access">Accessing 64 a sequence element</a></span></dt> 65</dl></dd> 66<dt><span class="section"><a href="variadic_macro_data/vmd_generic/vmd_convert_sequence.html">Getting 67 the type of data</a></span></dt> 68<dt><span class="section"><a href="variadic_macro_data/vmd_generic/vmd_assert.html">Testing for 69 equality and inequality</a></span></dt> 70</dl></dd> 71<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers.html">Macros with modifiers</a></span></dt> 72<dd><dl> 73<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers.html#variadic_macro_data.vmd_modifiers.vmd_modifiers_return_type">Return 74 type modifiers</a></span></dt> 75<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_filter.html">Filtering 76 modifiers</a></span></dt> 77<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_identifier.html">Identifier 78 modifiers</a></span></dt> 79<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_splitting.html">Splitting 80 modifiers</a></span></dt> 81<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_index.html">Index 82 modifiers</a></span></dt> 83<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_single.html">Modifiers 84 and the single-element sequence</a></span></dt> 85</dl></dd> 86<dt><span class="section"><a href="variadic_macro_data/vmd_identifier_subtype.html">Identifier 87 subtypes</a></span></dt> 88<dt><span class="section"><a href="variadic_macro_data/vmd_useful.html">Useful variadic macros 89 not in Boost PP</a></span></dt> 90<dd><dl> 91<dt><span class="section"><a href="variadic_macro_data/vmd_useful.html#variadic_macro_data.vmd_useful.vmd_assert">Asserting 92 and data types</a></span></dt> 93<dt><span class="section"><a href="variadic_macro_data/vmd_useful/vmd_identity.html">Generating 94 emptiness and identity</a></span></dt> 95<dt><span class="section"><a href="variadic_macro_data/vmd_useful/vmd_empty_ppdata.html">Functionality 96 for "empty" seqs and tuples</a></span></dt> 97</dl></dd> 98<dt><span class="section"><a href="variadic_macro_data/vmd_internal_macros.html">Controlling internal 99 usage</a></span></dt> 100<dt><span class="section"><a href="variadic_macro_data/vmd_reentrant.html">Boost PP re-entrant 101 versions</a></span></dt> 102<dt><span class="section"><a href="variadic_macro_data/vmd_dynamic_typing.html">Input as dynamic 103 types</a></span></dt> 104<dt><span class="section"><a href="variadic_macro_data/vmd_vc_isms.html">Visual C++ gotchas in 105 VMD</a></span></dt> 106<dt><span class="section"><a href="variadic_macro_data/vmd_conv.html">Version 1.7 to 1.8 conversion</a></span></dt> 107<dt><span class="section"><a href="variadic_macro_data/vmd_examples.html">Examples using VMD functionality</a></span></dt> 108<dt><span class="section"><a href="variadic_macro_data_reference.html">Variadic Macro Data Reference</a></span></dt> 109<dd><dl> 110<dt><span class="section"><a href="variadic_macro_data_reference.html#header.boost.vmd.array.to_seq_hpp">Header <boost/vmd/array/to_seq.hpp></a></span></dt> 111<dd><dl></dl></dd> 112<dt><span class="section"><a href="header/boost/vmd/list/to_seq_hpp.html">Header <boost/vmd/list/to_seq.hpp></a></span></dt> 113<dd><dl></dl></dd> 114<dt><span class="section"><a href="header/boost/vmd/to_seq_hpp.html">Header <boost/vmd/to_seq.hpp></a></span></dt> 115<dd><dl></dl></dd> 116<dt><span class="section"><a href="header/boost/vmd/tuple/to_seq_hpp.html">Header <boost/vmd/tuple/to_seq.hpp></a></span></dt> 117<dd><dl></dl></dd> 118<dt><span class="section"><a href="header/boost/vmd/array/to_tuple_hpp.html">Header <boost/vmd/array/to_tuple.hpp></a></span></dt> 119<dd><dl></dl></dd> 120<dt><span class="section"><a href="header/boost/vmd/list/to_tuple_hpp.html">Header <boost/vmd/list/to_tuple.hpp></a></span></dt> 121<dd><dl></dl></dd> 122<dt><span class="section"><a href="header/boost/vmd/seq/to_tuple_hpp.html">Header <boost/vmd/seq/to_tuple.hpp></a></span></dt> 123<dd><dl></dl></dd> 124<dt><span class="section"><a href="header/boost/vmd/to_tuple_hpp.html">Header <boost/vmd/to_tuple.hpp></a></span></dt> 125<dd><dl></dl></dd> 126<dt><span class="section"><a href="header/boost/vmd/assert_hpp.html">Header <boost/vmd/assert.hpp></a></span></dt> 127<dd><dl></dl></dd> 128<dt><span class="section"><a href="header/boost/vmd/assert_is_array_hpp.html">Header <boost/vmd/assert_is_array.hpp></a></span></dt> 129<dd><dl></dl></dd> 130<dt><span class="section"><a href="header/boost/vmd/assert_is_empty_hpp.html">Header <boost/vmd/assert_is_empty.hpp></a></span></dt> 131<dd><dl></dl></dd> 132<dt><span class="section"><a href="header/boost/vmd/assert_is_identifier_hpp.html">Header <boost/vmd/assert_is_identifier.hpp></a></span></dt> 133<dd><dl></dl></dd> 134<dt><span class="section"><a href="header/boost/vmd/assert_is_list_hpp.html">Header <boost/vmd/assert_is_list.hpp></a></span></dt> 135<dd><dl></dl></dd> 136<dt><span class="section"><a href="header/boost/vmd/assert_is_number_hpp.html">Header <boost/vmd/assert_is_number.hpp></a></span></dt> 137<dd><dl></dl></dd> 138<dt><span class="section"><a href="header/boost/vmd/assert_is_seq_hpp.html">Header <boost/vmd/assert_is_seq.hpp></a></span></dt> 139<dd><dl></dl></dd> 140<dt><span class="section"><a href="header/boost/vmd/assert_is_tuple_hpp.html">Header <boost/vmd/assert_is_tuple.hpp></a></span></dt> 141<dd><dl></dl></dd> 142<dt><span class="section"><a href="header/boost/vmd/assert_is_type_hpp.html">Header <boost/vmd/assert_is_type.hpp></a></span></dt> 143<dd><dl></dl></dd> 144<dt><span class="section"><a href="header/boost/vmd/elem_hpp.html">Header <boost/vmd/elem.hpp></a></span></dt> 145<dd><dl></dl></dd> 146<dt><span class="section"><a href="header/boost/vmd/empty_hpp.html">Header <boost/vmd/empty.hpp></a></span></dt> 147<dd><dl></dl></dd> 148<dt><span class="section"><a href="header/boost/vmd/enum_hpp.html">Header <boost/vmd/enum.hpp></a></span></dt> 149<dd><dl></dl></dd> 150<dt><span class="section"><a href="header/boost/vmd/equal_hpp.html">Header <boost/vmd/equal.hpp></a></span></dt> 151<dd><dl></dl></dd> 152<dt><span class="section"><a href="header/boost/vmd/get_type_hpp.html">Header <boost/vmd/get_type.hpp></a></span></dt> 153<dd><dl></dl></dd> 154<dt><span class="section"><a href="header/boost/vmd/identity_hpp.html">Header <boost/vmd/identity.hpp></a></span></dt> 155<dd><dl></dl></dd> 156<dt><span class="section"><a href="header/boost/vmd/is_array_hpp.html">Header <boost/vmd/is_array.hpp></a></span></dt> 157<dd><dl></dl></dd> 158<dt><span class="section"><a href="header/boost/vmd/is_empty_hpp.html">Header <boost/vmd/is_empty.hpp></a></span></dt> 159<dd><dl></dl></dd> 160<dt><span class="section"><a href="header/boost/vmd/is_empty_array_hpp.html">Header <boost/vmd/is_empty_array.hpp></a></span></dt> 161<dd><dl></dl></dd> 162<dt><span class="section"><a href="header/boost/vmd/is_empty_list_hpp.html">Header <boost/vmd/is_empty_list.hpp></a></span></dt> 163<dd><dl></dl></dd> 164<dt><span class="section"><a href="header/boost/vmd/is_identifier_hpp.html">Header <boost/vmd/is_identifier.hpp></a></span></dt> 165<dd><dl></dl></dd> 166<dt><span class="section"><a href="header/boost/vmd/is_list_hpp.html">Header <boost/vmd/is_list.hpp></a></span></dt> 167<dd><dl></dl></dd> 168<dt><span class="section"><a href="header/boost/vmd/is_multi_hpp.html">Header <boost/vmd/is_multi.hpp></a></span></dt> 169<dd><dl></dl></dd> 170<dt><span class="section"><a href="header/boost/vmd/is_number_hpp.html">Header <boost/vmd/is_number.hpp></a></span></dt> 171<dd><dl></dl></dd> 172<dt><span class="section"><a href="header/boost/vmd/is_parens_empty_hpp.html">Header <boost/vmd/is_parens_empty.hpp></a></span></dt> 173<dd><dl></dl></dd> 174<dt><span class="section"><a href="header/boost/vmd/is_seq_hpp.html">Header <boost/vmd/is_seq.hpp></a></span></dt> 175<dd><dl></dl></dd> 176<dt><span class="section"><a href="header/boost/vmd/is_tuple_hpp.html">Header <boost/vmd/is_tuple.hpp></a></span></dt> 177<dd><dl></dl></dd> 178<dt><span class="section"><a href="header/boost/vmd/is_type_hpp.html">Header <boost/vmd/is_type.hpp></a></span></dt> 179<dd><dl></dl></dd> 180<dt><span class="section"><a href="header/boost/vmd/is_unary_hpp.html">Header <boost/vmd/is_unary.hpp></a></span></dt> 181<dd><dl></dl></dd> 182<dt><span class="section"><a href="header/boost/vmd/not_equal_hpp.html">Header <boost/vmd/not_equal.hpp></a></span></dt> 183<dd><dl></dl></dd> 184<dt><span class="section"><a href="header/boost/vmd/seq/is_vmd_seq_hpp.html">Header <boost/vmd/seq/is_vmd_seq.hpp></a></span></dt> 185<dd><dl></dl></dd> 186<dt><span class="section"><a href="header/boost/vmd/seq/pop_back_hpp.html">Header <boost/vmd/seq/pop_back.hpp></a></span></dt> 187<dd><dl></dl></dd> 188<dt><span class="section"><a href="header/boost/vmd/tuple/pop_back_hpp.html">Header <boost/vmd/tuple/pop_back.hpp></a></span></dt> 189<dd><dl></dl></dd> 190<dt><span class="section"><a href="header/boost/vmd/seq/pop_front_hpp.html">Header <boost/vmd/seq/pop_front.hpp></a></span></dt> 191<dd><dl></dl></dd> 192<dt><span class="section"><a href="header/boost/vmd/tuple/pop_front_hpp.html">Header <boost/vmd/tuple/pop_front.hpp></a></span></dt> 193<dd><dl></dl></dd> 194<dt><span class="section"><a href="header/boost/vmd/seq/push_back_hpp.html">Header <boost/vmd/seq/push_back.hpp></a></span></dt> 195<dd><dl></dl></dd> 196<dt><span class="section"><a href="header/boost/vmd/tuple/push_back_hpp.html">Header <boost/vmd/tuple/push_back.hpp></a></span></dt> 197<dd><dl></dl></dd> 198<dt><span class="section"><a href="header/boost/vmd/seq/push_front_hpp.html">Header <boost/vmd/seq/push_front.hpp></a></span></dt> 199<dd><dl></dl></dd> 200<dt><span class="section"><a href="header/boost/vmd/tuple/push_front_hpp.html">Header <boost/vmd/tuple/push_front.hpp></a></span></dt> 201<dd><dl></dl></dd> 202<dt><span class="section"><a href="header/boost/vmd/seq/remove_hpp.html">Header <boost/vmd/seq/remove.hpp></a></span></dt> 203<dd><dl></dl></dd> 204<dt><span class="section"><a href="header/boost/vmd/tuple/remove_hpp.html">Header <boost/vmd/tuple/remove.hpp></a></span></dt> 205<dd><dl></dl></dd> 206<dt><span class="section"><a href="header/boost/vmd/seq/size_hpp.html">Header <boost/vmd/seq/size.hpp></a></span></dt> 207<dd><dl></dl></dd> 208<dt><span class="section"><a href="header/boost/vmd/size_hpp.html">Header <boost/vmd/size.hpp></a></span></dt> 209<dd><dl></dl></dd> 210<dt><span class="section"><a href="header/boost/vmd/tuple/size_hpp.html">Header <boost/vmd/tuple/size.hpp></a></span></dt> 211<dd><dl></dl></dd> 212<dt><span class="section"><a href="header/boost/vmd/seq/to_array_hpp.html">Header <boost/vmd/seq/to_array.hpp></a></span></dt> 213<dd><dl></dl></dd> 214<dt><span class="section"><a href="header/boost/vmd/to_array_hpp.html">Header <boost/vmd/to_array.hpp></a></span></dt> 215<dd><dl></dl></dd> 216<dt><span class="section"><a href="header/boost/vmd/tuple/to_array_hpp.html">Header <boost/vmd/tuple/to_array.hpp></a></span></dt> 217<dd><dl></dl></dd> 218<dt><span class="section"><a href="header/boost/vmd/seq/to_list_hpp.html">Header <boost/vmd/seq/to_list.hpp></a></span></dt> 219<dd><dl></dl></dd> 220<dt><span class="section"><a href="header/boost/vmd/to_list_hpp.html">Header <boost/vmd/to_list.hpp></a></span></dt> 221<dd><dl></dl></dd> 222<dt><span class="section"><a href="header/boost/vmd/tuple/to_list_hpp.html">Header <boost/vmd/tuple/to_list.hpp></a></span></dt> 223<dd><dl></dl></dd> 224<dt><span class="section"><a href="header/boost/vmd/tuple/is_vmd_tuple_hpp.html">Header <boost/vmd/tuple/is_vmd_tuple.hpp></a></span></dt> 225<dd><dl></dl></dd> 226</dl></dd> 227<dt><span class="section"><a href="variadic_macro_data/vmd_design.html">Design</a></span></dt> 228<dt><span class="section"><a href="variadic_macro_data/vmd_compilers.html">Compilers</a></span></dt> 229<dt><span class="section"><a href="variadic_macro_data/vmd_history.html">History</a></span></dt> 230<dt><span class="section"><a href="variadic_macro_data/vmd_ack.html">Acknowledgements</a></span></dt> 231<dt><span class="section"><a href="index/s24.html">Index</a></span></dt> 232</dl> 233</div> 234<div class="section"> 235<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 236<a name="variadic_macro_data.vmd_intro"></a><a class="link" href="index.html#variadic_macro_data.vmd_intro" title="Introduction">Introduction</a> 237</h2></div></div></div> 238<p> 239 Welcome to the Variadic Macro Data library. 240 </p> 241<p> 242 The Variadic Macro Data library, referred to hereafter as VMD for short, is 243 a library of variadic macros which provide enhancements to the functionality 244 in the Boost preprocessor library ( Boost PP ), especially as it relates to 245 preprocessor data types. 246 </p> 247<p> 248 In the Boost PP library the preprocessor data types which have specific functionality 249 are numbers ( values between 0 and 256) and the composite data types Boost 250 PP arrays, Boost PP lists, Boost PP seqs, and Boost PP tuples. 251 </p> 252<p> 253 The preprocessor data types with which VMD has specific functionality are the 254 same data types as the Boost PP library as well as these other preprocessor 255 data types: emptiness, VMD identifiers, VMD types ( a subset of identifiers 256 ), and VMD sequences, which is another composite data type. A sequence is zero 257 or more of any of the other preprocessor data types, other than emptiness, 258 which have been previously mentioned asd supported by the VMD library, sequentially 259 following each other. 260 </p> 261<p> 262 The VMD library does not replicate in any way the functionality of the Boost 263 PP data types, but does extend some of that functionality in various ways, 264 along with also providing specific functionality for emptiness, VMD identifiers, 265 VMD types, and VMD sequences. 266 </p> 267<h4> 268<a name="variadic_macro_data.vmd_intro.h0"></a> 269 <span class="phrase"><a name="variadic_macro_data.vmd_intro.data_type_examples"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.data_type_examples">Data 270 type examples</a> 271 </h4> 272<div class="table"> 273<a name="variadic_macro_data.vmd_intro.dwe"></a><p class="title"><b>Table 1.1. Data types with examples</b></p> 274<div class="table-contents"><table class="table" summary="Data types with examples"> 275<colgroup> 276<col> 277<col> 278</colgroup> 279<thead><tr> 280<th> 281 <p> 282 Type 283 </p> 284 </th> 285<th> 286 <p> 287 Example 288 </p> 289 </th> 290</tr></thead> 291<tbody> 292<tr> 293<td> 294 <p> 295 identifier 296 </p> 297 </td> 298<td> 299 <p> 300 anyname 301 </p> 302 </td> 303</tr> 304<tr> 305<td> 306 <p> 307 number 308 </p> 309 </td> 310<td> 311 <p> 312 47 313 </p> 314 </td> 315</tr> 316<tr> 317<td> 318 <p> 319 type 320 </p> 321 </td> 322<td> 323 <p> 324 BOOST_VMD_TYPE_NUMBER 325 </p> 326 </td> 327</tr> 328<tr> 329<td> 330 <p> 331 array 332 </p> 333 </td> 334<td> 335 <p> 336 (4,(an_identifier,156,BOOST_VMD_TYPE_IDENTIFIER)) 337 </p> 338 </td> 339</tr> 340<tr> 341<td> 342 <p> 343 list 344 </p> 345 </td> 346<td> 347 <p> 348 (78,(some_identifier,(BOOST_VMD_TYPE_TYPE,BOOST_PP_NIL))) 349 </p> 350 </td> 351</tr> 352<tr> 353<td> 354 <p> 355 seq 356 </p> 357 </td> 358<td> 359 <p> 360 (identifier)(89)(245) 361 </p> 362 </td> 363</tr> 364<tr> 365<td> 366 <p> 367 tuple 368 </p> 369 </td> 370<td> 371 <p> 372 (any_id,175,BOOST_VMD_TYPE_LIST,happy,21) 373 </p> 374 </td> 375</tr> 376<tr> 377<td> 378 <p> 379 sequence 380 </p> 381 </td> 382<td> 383 <p> 384 tree 59 (56,BOOST_VMD_TYPE_SEQ) (128)(fire)(clown) (47,(BOOST_VMD_TYPE_TUPLE,BOOST_PP_NIL)) 385 </p> 386 </td> 387</tr> 388</tbody> 389</table></div> 390</div> 391<br class="table-break"><h4> 392<a name="variadic_macro_data.vmd_intro.h1"></a> 393 <span class="phrase"><a name="variadic_macro_data.vmd_intro.emptiness"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.emptiness">Emptiness</a> 394 </h4> 395<p> 396 Often we speak of a macro expanding to nothing or being passed nothing as an 397 argument. Instead of the term "nothing", which can mean many things 398 in general in C++ programming terms, we will call this facility of the preprocessor 399 "emptiness". 400 </p> 401<p> 402 Emptiness is the lack of any preprocessing tokens. A macro which expands to 403 nothing, as in: 404 </p> 405<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">RETURN_NOTHING</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> 406</pre> 407<p> 408 is said to return emptiness. Conversely a macro which could accept nothing 409 when invoked, such as in: 410 </p> 411<pre class="programlisting"><span class="identifier">RETURN_NOTHING</span><span class="special">()</span> 412</pre> 413<p> 414 is said to accept emptiness, or no preprocxessing tokens. 415 </p> 416<p> 417 Finally emptiness can be part of any composite data type as in: 418 </p> 419<pre class="programlisting"><span class="special">(</span><span class="number">45</span><span class="special">,,</span><span class="identifier">some_name</span><span class="special">)</span> 420</pre> 421<p> 422 where the second Boost PP tuple element is empty. 423 </p> 424<h4> 425<a name="variadic_macro_data.vmd_intro.h2"></a> 426 <span class="phrase"><a name="variadic_macro_data.vmd_intro.what_is_the_advantage_to_using_t"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.what_is_the_advantage_to_using_t">What 427 is the advantage to using the VMD library ?</a> 428 </h4> 429<p> 430 In the Boost PP library a good deal of functionality centers upon manipulating 431 Boost PP numbers, and particularly the Boost PP numbers of 0 and 1 as a boolean 432 value on which you can use Boost PP preprocessing logic to take different preprocessing 433 paths when writing a macro. In other words when using Boost PP the logic of 434 a macro is often based on the value of a Boost PP number. This is because Boost 435 PP numbers can be compared to each other for equality or inequality, among 436 other types of comparison, and Boost PP macros which use this ability to compare 437 Boost PP numbers, such as the Boost PP macros BOOST_PP_IF or BOOST_PP_IIF, 438 can choose different macro expansion paths based on the results of such a comparison. 439 </p> 440<p> 441 The Boost VMD library adds to the comparison of Boost PP numbers the ability 442 to compare any of its other data types for equality or inequality, therefore 443 allowing the logic of a macro to depend on the value of any of the preprocessor 444 data types it supports. 445 </p> 446<p> 447 Even more signficantly the Boost VMD library has the ability to discover the 448 type of preprocessing data if that data is one of the data types the VMD library 449 supports, which gives the end-user not only the ability to change the macro 450 expansion logic based on the value of a supported data type but also based 451 on the actual type of preprocessing data. 452 </p> 453<p> 454 The ability to determining macro expansion based on the type of a macro argument 455 allows the macro programmer to create a single macro which expands differently 456 based on the type of preprocessing data of one or more of its arguments, as 457 well as the value of an argument of a particular type. This allows macro logic 458 to be designed in a more flexible way, relying on the type of data and/or the 459 value of the data. If this intrigues you, continue reading to understand how 460 you can use VMD to do macro programming. 461 </p> 462<h4> 463<a name="variadic_macro_data.vmd_intro.h3"></a> 464 <span class="phrase"><a name="variadic_macro_data.vmd_intro.functionality_areas"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.functionality_areas">Functionality 465 areas</a> 466 </h4> 467<p> 468 The functionality of the library may be summed up as: 469 </p> 470<div class="orderedlist"><ol class="orderedlist" type="1"> 471<li class="listitem"> 472 Provide a better way of testing for and using empty parameters and empty 473 preprocessor data. 474 </li> 475<li class="listitem"> 476 Provide ways for testing/parsing for VMD identifiers, Boost PP numbers, 477 VMD types, Boost PP tuples, Boost PP arrays, Boost PP lists, and Boost 478 PP seqs. 479 </li> 480<li class="listitem"> 481 Provide ways for testing/parsing VMD sequences of VMD identifiers, Boost 482 PP numbers, VMD types, Boost PP tuples, Boost PP arrays, Boost PP lists, 483 and Boost PP seqs. 484 </li> 485<li class="listitem"> 486 Provide some useful variadic only macros not in Boost PP. 487 </li> 488</ol></div> 489<p> 490 The library is a header only library and all macros in the library are included 491 by a single header, whose name is 'vmd.hpp'. Individual headers may be used 492 for different functionality in the library and will be denoted when that functionality 493 is explained. 494 </p> 495<p> 496 All the macros in the library begin with the sequence 'BOOST_VMD_' to distinguish 497 them from other macros the end-user might use. Therefore the end-user should 498 not use any C++ identifiers, whether in macros or otherwise, which being with 499 the sequence 'BOOST_VMD_'. 500 </p> 501<p> 502 Use of the library is only dependent on Boost PP. The library also uses Boost 503 detail lightweight_test.hpp for its own tests. 504 </p> 505</div> 506</div> 507<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 508<td align="left"><p><small>Last revised: August 11, 2020 at 14:59:06 GMT</small></p></td> 509<td align="right"><div class="copyright-footer"></div></td> 510</tr></table> 511<hr> 512<div class="spirit-nav"><a accesskey="n" href="variadic_macro_data/vmd_naming.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div> 513</body> 514</html> 515