index.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Chapter&#160;1.&#160;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&#160;1.&#160;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&#160;1.&#160;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 &#169; 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 &lt;boost/vmd/array/to_seq.hpp&gt;</a></span></dt>
  111. <dd><dl></dl></dd>
  112. <dt><span class="section"><a href="header/boost/vmd/list/to_seq_hpp.html">Header &lt;boost/vmd/list/to_seq.hpp&gt;</a></span></dt>
  113. <dd><dl></dl></dd>
  114. <dt><span class="section"><a href="header/boost/vmd/to_seq_hpp.html">Header &lt;boost/vmd/to_seq.hpp&gt;</a></span></dt>
  115. <dd><dl></dl></dd>
  116. <dt><span class="section"><a href="header/boost/vmd/tuple/to_seq_hpp.html">Header &lt;boost/vmd/tuple/to_seq.hpp&gt;</a></span></dt>
  117. <dd><dl></dl></dd>
  118. <dt><span class="section"><a href="header/boost/vmd/array/to_tuple_hpp.html">Header &lt;boost/vmd/array/to_tuple.hpp&gt;</a></span></dt>
  119. <dd><dl></dl></dd>
  120. <dt><span class="section"><a href="header/boost/vmd/list/to_tuple_hpp.html">Header &lt;boost/vmd/list/to_tuple.hpp&gt;</a></span></dt>
  121. <dd><dl></dl></dd>
  122. <dt><span class="section"><a href="header/boost/vmd/seq/to_tuple_hpp.html">Header &lt;boost/vmd/seq/to_tuple.hpp&gt;</a></span></dt>
  123. <dd><dl></dl></dd>
  124. <dt><span class="section"><a href="header/boost/vmd/to_tuple_hpp.html">Header &lt;boost/vmd/to_tuple.hpp&gt;</a></span></dt>
  125. <dd><dl></dl></dd>
  126. <dt><span class="section"><a href="header/boost/vmd/assert_hpp.html">Header &lt;boost/vmd/assert.hpp&gt;</a></span></dt>
  127. <dd><dl></dl></dd>
  128. <dt><span class="section"><a href="header/boost/vmd/assert_is_array_hpp.html">Header &lt;boost/vmd/assert_is_array.hpp&gt;</a></span></dt>
  129. <dd><dl></dl></dd>
  130. <dt><span class="section"><a href="header/boost/vmd/assert_is_empty_hpp.html">Header &lt;boost/vmd/assert_is_empty.hpp&gt;</a></span></dt>
  131. <dd><dl></dl></dd>
  132. <dt><span class="section"><a href="header/boost/vmd/assert_is_identifier_hpp.html">Header &lt;boost/vmd/assert_is_identifier.hpp&gt;</a></span></dt>
  133. <dd><dl></dl></dd>
  134. <dt><span class="section"><a href="header/boost/vmd/assert_is_list_hpp.html">Header &lt;boost/vmd/assert_is_list.hpp&gt;</a></span></dt>
  135. <dd><dl></dl></dd>
  136. <dt><span class="section"><a href="header/boost/vmd/assert_is_number_hpp.html">Header &lt;boost/vmd/assert_is_number.hpp&gt;</a></span></dt>
  137. <dd><dl></dl></dd>
  138. <dt><span class="section"><a href="header/boost/vmd/assert_is_seq_hpp.html">Header &lt;boost/vmd/assert_is_seq.hpp&gt;</a></span></dt>
  139. <dd><dl></dl></dd>
  140. <dt><span class="section"><a href="header/boost/vmd/assert_is_tuple_hpp.html">Header &lt;boost/vmd/assert_is_tuple.hpp&gt;</a></span></dt>
  141. <dd><dl></dl></dd>
  142. <dt><span class="section"><a href="header/boost/vmd/assert_is_type_hpp.html">Header &lt;boost/vmd/assert_is_type.hpp&gt;</a></span></dt>
  143. <dd><dl></dl></dd>
  144. <dt><span class="section"><a href="header/boost/vmd/elem_hpp.html">Header &lt;boost/vmd/elem.hpp&gt;</a></span></dt>
  145. <dd><dl></dl></dd>
  146. <dt><span class="section"><a href="header/boost/vmd/empty_hpp.html">Header &lt;boost/vmd/empty.hpp&gt;</a></span></dt>
  147. <dd><dl></dl></dd>
  148. <dt><span class="section"><a href="header/boost/vmd/enum_hpp.html">Header &lt;boost/vmd/enum.hpp&gt;</a></span></dt>
  149. <dd><dl></dl></dd>
  150. <dt><span class="section"><a href="header/boost/vmd/equal_hpp.html">Header &lt;boost/vmd/equal.hpp&gt;</a></span></dt>
  151. <dd><dl></dl></dd>
  152. <dt><span class="section"><a href="header/boost/vmd/get_type_hpp.html">Header &lt;boost/vmd/get_type.hpp&gt;</a></span></dt>
  153. <dd><dl></dl></dd>
  154. <dt><span class="section"><a href="header/boost/vmd/identity_hpp.html">Header &lt;boost/vmd/identity.hpp&gt;</a></span></dt>
  155. <dd><dl></dl></dd>
  156. <dt><span class="section"><a href="header/boost/vmd/is_array_hpp.html">Header &lt;boost/vmd/is_array.hpp&gt;</a></span></dt>
  157. <dd><dl></dl></dd>
  158. <dt><span class="section"><a href="header/boost/vmd/is_empty_hpp.html">Header &lt;boost/vmd/is_empty.hpp&gt;</a></span></dt>
  159. <dd><dl></dl></dd>
  160. <dt><span class="section"><a href="header/boost/vmd/is_empty_array_hpp.html">Header &lt;boost/vmd/is_empty_array.hpp&gt;</a></span></dt>
  161. <dd><dl></dl></dd>
  162. <dt><span class="section"><a href="header/boost/vmd/is_empty_list_hpp.html">Header &lt;boost/vmd/is_empty_list.hpp&gt;</a></span></dt>
  163. <dd><dl></dl></dd>
  164. <dt><span class="section"><a href="header/boost/vmd/is_identifier_hpp.html">Header &lt;boost/vmd/is_identifier.hpp&gt;</a></span></dt>
  165. <dd><dl></dl></dd>
  166. <dt><span class="section"><a href="header/boost/vmd/is_list_hpp.html">Header &lt;boost/vmd/is_list.hpp&gt;</a></span></dt>
  167. <dd><dl></dl></dd>
  168. <dt><span class="section"><a href="header/boost/vmd/is_multi_hpp.html">Header &lt;boost/vmd/is_multi.hpp&gt;</a></span></dt>
  169. <dd><dl></dl></dd>
  170. <dt><span class="section"><a href="header/boost/vmd/is_number_hpp.html">Header &lt;boost/vmd/is_number.hpp&gt;</a></span></dt>
  171. <dd><dl></dl></dd>
  172. <dt><span class="section"><a href="header/boost/vmd/is_parens_empty_hpp.html">Header &lt;boost/vmd/is_parens_empty.hpp&gt;</a></span></dt>
  173. <dd><dl></dl></dd>
  174. <dt><span class="section"><a href="header/boost/vmd/is_seq_hpp.html">Header &lt;boost/vmd/is_seq.hpp&gt;</a></span></dt>
  175. <dd><dl></dl></dd>
  176. <dt><span class="section"><a href="header/boost/vmd/is_tuple_hpp.html">Header &lt;boost/vmd/is_tuple.hpp&gt;</a></span></dt>
  177. <dd><dl></dl></dd>
  178. <dt><span class="section"><a href="header/boost/vmd/is_type_hpp.html">Header &lt;boost/vmd/is_type.hpp&gt;</a></span></dt>
  179. <dd><dl></dl></dd>
  180. <dt><span class="section"><a href="header/boost/vmd/is_unary_hpp.html">Header &lt;boost/vmd/is_unary.hpp&gt;</a></span></dt>
  181. <dd><dl></dl></dd>
  182. <dt><span class="section"><a href="header/boost/vmd/not_equal_hpp.html">Header &lt;boost/vmd/not_equal.hpp&gt;</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 &lt;boost/vmd/seq/is_vmd_seq.hpp&gt;</a></span></dt>
  185. <dd><dl></dl></dd>
  186. <dt><span class="section"><a href="header/boost/vmd/seq/pop_back_hpp.html">Header &lt;boost/vmd/seq/pop_back.hpp&gt;</a></span></dt>
  187. <dd><dl></dl></dd>
  188. <dt><span class="section"><a href="header/boost/vmd/tuple/pop_back_hpp.html">Header &lt;boost/vmd/tuple/pop_back.hpp&gt;</a></span></dt>
  189. <dd><dl></dl></dd>
  190. <dt><span class="section"><a href="header/boost/vmd/seq/pop_front_hpp.html">Header &lt;boost/vmd/seq/pop_front.hpp&gt;</a></span></dt>
  191. <dd><dl></dl></dd>
  192. <dt><span class="section"><a href="header/boost/vmd/tuple/pop_front_hpp.html">Header &lt;boost/vmd/tuple/pop_front.hpp&gt;</a></span></dt>
  193. <dd><dl></dl></dd>
  194. <dt><span class="section"><a href="header/boost/vmd/seq/push_back_hpp.html">Header &lt;boost/vmd/seq/push_back.hpp&gt;</a></span></dt>
  195. <dd><dl></dl></dd>
  196. <dt><span class="section"><a href="header/boost/vmd/tuple/push_back_hpp.html">Header &lt;boost/vmd/tuple/push_back.hpp&gt;</a></span></dt>
  197. <dd><dl></dl></dd>
  198. <dt><span class="section"><a href="header/boost/vmd/seq/push_front_hpp.html">Header &lt;boost/vmd/seq/push_front.hpp&gt;</a></span></dt>
  199. <dd><dl></dl></dd>
  200. <dt><span class="section"><a href="header/boost/vmd/tuple/push_front_hpp.html">Header &lt;boost/vmd/tuple/push_front.hpp&gt;</a></span></dt>
  201. <dd><dl></dl></dd>
  202. <dt><span class="section"><a href="header/boost/vmd/seq/remove_hpp.html">Header &lt;boost/vmd/seq/remove.hpp&gt;</a></span></dt>
  203. <dd><dl></dl></dd>
  204. <dt><span class="section"><a href="header/boost/vmd/tuple/remove_hpp.html">Header &lt;boost/vmd/tuple/remove.hpp&gt;</a></span></dt>
  205. <dd><dl></dl></dd>
  206. <dt><span class="section"><a href="header/boost/vmd/seq/size_hpp.html">Header &lt;boost/vmd/seq/size.hpp&gt;</a></span></dt>
  207. <dd><dl></dl></dd>
  208. <dt><span class="section"><a href="header/boost/vmd/size_hpp.html">Header &lt;boost/vmd/size.hpp&gt;</a></span></dt>
  209. <dd><dl></dl></dd>
  210. <dt><span class="section"><a href="header/boost/vmd/tuple/size_hpp.html">Header &lt;boost/vmd/tuple/size.hpp&gt;</a></span></dt>
  211. <dd><dl></dl></dd>
  212. <dt><span class="section"><a href="header/boost/vmd/seq/to_array_hpp.html">Header &lt;boost/vmd/seq/to_array.hpp&gt;</a></span></dt>
  213. <dd><dl></dl></dd>
  214. <dt><span class="section"><a href="header/boost/vmd/to_array_hpp.html">Header &lt;boost/vmd/to_array.hpp&gt;</a></span></dt>
  215. <dd><dl></dl></dd>
  216. <dt><span class="section"><a href="header/boost/vmd/tuple/to_array_hpp.html">Header &lt;boost/vmd/tuple/to_array.hpp&gt;</a></span></dt>
  217. <dd><dl></dl></dd>
  218. <dt><span class="section"><a href="header/boost/vmd/seq/to_list_hpp.html">Header &lt;boost/vmd/seq/to_list.hpp&gt;</a></span></dt>
  219. <dd><dl></dl></dd>
  220. <dt><span class="section"><a href="header/boost/vmd/to_list_hpp.html">Header &lt;boost/vmd/to_list.hpp&gt;</a></span></dt>
  221. <dd><dl></dl></dd>
  222. <dt><span class="section"><a href="header/boost/vmd/tuple/to_list_hpp.html">Header &lt;boost/vmd/tuple/to_list.hpp&gt;</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 &lt;boost/vmd/tuple/is_vmd_tuple.hpp&gt;</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. The preprocessor data types with which VMD has specific functionality are emptiness,
  249. identifiers, numbers ( a subset of identifiers ), types ( a subset of identifiers
  250. ), Boost PP arrays, Boost PP lists, Boost PP seqs, Boost PP tuples, and sequences.
  251. The first four are basic preprocessor data types while the latter five are
  252. composite preprocessor data types. A sequence is zero or more of the other
  253. preprocessor data types following each other.
  254. </p>
  255. <h4>
  256. <a name="variadic_macro_data.vmd_intro.h0"></a>
  257. <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
  258. type examples</a>
  259. </h4>
  260. <div class="table">
  261. <a name="variadic_macro_data.vmd_intro.dwe"></a><p class="title"><b>Table&#160;1.1.&#160;Data types with examples</b></p>
  262. <div class="table-contents"><table class="table" summary="Data types with examples">
  263. <colgroup>
  264. <col>
  265. <col>
  266. </colgroup>
  267. <thead><tr>
  268. <th>
  269. <p>
  270. Type
  271. </p>
  272. </th>
  273. <th>
  274. <p>
  275. Example
  276. </p>
  277. </th>
  278. </tr></thead>
  279. <tbody>
  280. <tr>
  281. <td>
  282. <p>
  283. identifier
  284. </p>
  285. </td>
  286. <td>
  287. <p>
  288. anyname
  289. </p>
  290. </td>
  291. </tr>
  292. <tr>
  293. <td>
  294. <p>
  295. number
  296. </p>
  297. </td>
  298. <td>
  299. <p>
  300. 47
  301. </p>
  302. </td>
  303. </tr>
  304. <tr>
  305. <td>
  306. <p>
  307. type
  308. </p>
  309. </td>
  310. <td>
  311. <p>
  312. BOOST_VMD_TYPE_NUMBER
  313. </p>
  314. </td>
  315. </tr>
  316. <tr>
  317. <td>
  318. <p>
  319. array
  320. </p>
  321. </td>
  322. <td>
  323. <p>
  324. (4,(an_identifier,156,BOOST_VMD_TYPE_IDENTIFIER))
  325. </p>
  326. </td>
  327. </tr>
  328. <tr>
  329. <td>
  330. <p>
  331. list
  332. </p>
  333. </td>
  334. <td>
  335. <p>
  336. (78,(some_identifier,(BOOST_VMD_TYPE_TYPE,BOOST_PP_NIL)))
  337. </p>
  338. </td>
  339. </tr>
  340. <tr>
  341. <td>
  342. <p>
  343. seq
  344. </p>
  345. </td>
  346. <td>
  347. <p>
  348. (identifier)(89)(245)
  349. </p>
  350. </td>
  351. </tr>
  352. <tr>
  353. <td>
  354. <p>
  355. tuple
  356. </p>
  357. </td>
  358. <td>
  359. <p>
  360. (any_id,175,BOOST_VMD_TYPE_LIST,happy,21)
  361. </p>
  362. </td>
  363. </tr>
  364. <tr>
  365. <td>
  366. <p>
  367. sequence
  368. </p>
  369. </td>
  370. <td>
  371. <p>
  372. tree 59 (56,BOOST_VMD_TYPE_SEQ) (128)(fire)(clown) (47,(BOOST_VMD_TYPE_TUPLE,BOOST_PP_NIL))
  373. </p>
  374. </td>
  375. </tr>
  376. </tbody>
  377. </table></div>
  378. </div>
  379. <br class="table-break"><p>
  380. Emptiness is the lack of any preprocessing tokens. A macro which expands to
  381. nothing, as in:
  382. </p>
  383. <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>
  384. </pre>
  385. <p>
  386. is said to return emptiness. Conversely a macro could accept nothing when invoked,
  387. such as in:
  388. </p>
  389. <pre class="programlisting"><span class="identifier">RETURN_NOTHING</span><span class="special">()</span>
  390. </pre>
  391. <p>
  392. Finally emptiness can be part of any composite data type as in:
  393. </p>
  394. <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>
  395. </pre>
  396. <p>
  397. where the second tuple element is empty.
  398. </p>
  399. <h4>
  400. <a name="variadic_macro_data.vmd_intro.h1"></a>
  401. <span class="phrase"><a name="variadic_macro_data.vmd_intro.what_is_the_advantage"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.what_is_the_advantage">What
  402. is the advantage ?</a>
  403. </h4>
  404. <p>
  405. VMD can identify any of the preprocessor data types previously mentioned, and
  406. can parse sequences into their individual preprocessor data types. You may
  407. well ask why that is important.
  408. </p>
  409. <p>
  410. In Boost PP macro programming a great deal of the control logic of designing
  411. a macro is based on the support Boost PP has for numbers and testing for the
  412. value of a number, in particular 0 and 1 to represent boolean choices. Essentially
  413. Boost PP often uses the value of a number to control the logic in a macro's
  414. design.
  415. </p>
  416. <p>
  417. VMD does not attempt, in any way, to duplicate Boost PP's support for testing
  418. the value of numbers or of the boolean 0 or 1 values, but just reuses that
  419. functionality. What VMD offers, which goes beyond Boost PP, is a system for
  420. deciphering the preprocessor data types, as well as comparing any of the preprocessor
  421. data types for equality to any given value. This allows macro logic to be designed
  422. in a more flexible way, relying on the type of data and/or the value of the
  423. data. If this intrigues you, continue reading to understand how you can use
  424. VMD to do macro programming.
  425. </p>
  426. <h4>
  427. <a name="variadic_macro_data.vmd_intro.h2"></a>
  428. <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
  429. areas</a>
  430. </h4>
  431. <p>
  432. The functionality of the library may be summed up as:
  433. </p>
  434. <div class="orderedlist"><ol class="orderedlist" type="1">
  435. <li class="listitem">
  436. Provide a better way of testing for and using empty parameters and empty
  437. preprocessor data.
  438. </li>
  439. <li class="listitem">
  440. Provide ways for testing/parsing for identifiers, numbers, types, tuples,
  441. arrays, lists, and seqs.
  442. </li>
  443. <li class="listitem">
  444. Provide ways for testing/parsing sequences of identifiers, numbers, types,
  445. tuples, arrays, lists. and seqs.
  446. </li>
  447. <li class="listitem">
  448. Provide some useful variadic macros not in Boost PP.
  449. </li>
  450. </ol></div>
  451. <p>
  452. The library is a header only library and all macros in the library are included
  453. by a single header, whose name is 'vmd.hpp'. Individual headers may be used
  454. for different functionality in the library and will be denoted when that functionality
  455. is explained.
  456. </p>
  457. <p>
  458. All the macros in the library begin with the sequence 'BOOST_VMD_' to distinguish
  459. them from other macros the end-user might use. Therefore the end-user should
  460. not use any C++ identifiers, whether in macros or otherwise, which being with
  461. the sequence 'BOOST_VMD_'.
  462. </p>
  463. <p>
  464. Use of the library is only dependent on Boost PP. The library also uses Boost
  465. detail lightweight_test.hpp for its own tests.
  466. </p>
  467. </div>
  468. </div>
  469. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  470. <td align="left"><p><small>Last revised: December 10, 2019 at 00:21:47 GMT</small></p></td>
  471. <td align="right"><div class="copyright-footer"></div></td>
  472. </tr></table>
  473. <hr>
  474. <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>
  475. </body>
  476. </html>