boost/libs/vmd/doc/html/index.html
2022-12-15 23:45:23 +08:00

477 lines
24 KiB
HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;1.&#160;The Variadic Macro Data Library 1.9</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Chapter&#160;1.&#160;The Variadic Macro Data Library 1.9">
<link rel="next" href="variadic_macro_data/vmd_naming.html" title="Naming conventions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<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>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="variadic_macro_data"></a>Chapter&#160;1.&#160;The Variadic Macro Data Library 1.9</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Edward</span> <span class="surname">Diener</span>
</h3></div></div>
<div><p class="copyright">Copyright &#169; 2010-2017 Tropic Software
East Inc</p></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="index.html#variadic_macro_data.vmd_intro">Introduction</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_naming.html">Naming conventions</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_whyhow.html">Why and how to use</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_vmacros.html">Using variadic macros</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_vc.html">Visual C++ define</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_detail.html">Functional groups</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_data_types.html">Data types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific.html">Specific macros for working
with data types</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific.html#variadic_macro_data.vmd_specific.vmd_test_empty">Emptiness</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_constraints.html">Macro
constraints</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_identifier.html">Identifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_number.html">Numbers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_type.html">Types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_pp_data_types.html">VMD
and Boost PP data types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific/vmd_identifying.html">Identifying
data types</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html">Generic macros for working
with data types</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html#variadic_macro_data.vmd_generic.vmd_sequence">Parsing
sequences</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html#variadic_macro_data.vmd_generic.vmd_sequence.vmd_sequence_convert">Converting
sequences</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_generic.html#variadic_macro_data.vmd_generic.vmd_sequence.vmd_sequence_access">Accessing
a sequence element</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_generic/vmd_convert_sequence.html">Getting
the type of data</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_generic/vmd_assert.html">Testing for
equality and inequality</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers.html">Macros with modifiers</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers.html#variadic_macro_data.vmd_modifiers.vmd_modifiers_return_type">Return
type modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_filter.html">Filtering
modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_identifier.html">Identifier
modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_splitting.html">Splitting
modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_index.html">Index
modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_single.html">Modifiers
and the single-element sequence</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_identifier_subtype.html">Identifier
subtypes</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful.html">Useful variadic macros
not in Boost PP</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful.html#variadic_macro_data.vmd_useful.vmd_assert">Asserting
and data types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful/vmd_identity.html">Generating
emptiness and identity</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful/vmd_empty_ppdata.html">Functionality
for "empty" seqs and tuples</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_internal_macros.html">Controlling internal
usage</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_reentrant.html">Boost PP re-entrant
versions</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_dynamic_typing.html">Input as dynamic
types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_vc_isms.html">Visual C++ gotchas in
VMD</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_conv.html">Version 1.7 to 1.8 conversion</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_examples.html">Examples using VMD functionality</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data_reference.html">Variadic Macro Data Reference</a></span></dt>
<dd><dl>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_seq_hpp.html">Header &lt;boost/vmd/to_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_tuple_hpp.html">Header &lt;boost/vmd/to_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_hpp.html">Header &lt;boost/vmd/assert.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/elem_hpp.html">Header &lt;boost/vmd/elem.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/empty_hpp.html">Header &lt;boost/vmd/empty.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/enum_hpp.html">Header &lt;boost/vmd/enum.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/equal_hpp.html">Header &lt;boost/vmd/equal.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/get_type_hpp.html">Header &lt;boost/vmd/get_type.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/identity_hpp.html">Header &lt;boost/vmd/identity.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_array_hpp.html">Header &lt;boost/vmd/is_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_empty_hpp.html">Header &lt;boost/vmd/is_empty.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_identifier_hpp.html">Header &lt;boost/vmd/is_identifier.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_list_hpp.html">Header &lt;boost/vmd/is_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_multi_hpp.html">Header &lt;boost/vmd/is_multi.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_number_hpp.html">Header &lt;boost/vmd/is_number.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_seq_hpp.html">Header &lt;boost/vmd/is_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_tuple_hpp.html">Header &lt;boost/vmd/is_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_type_hpp.html">Header &lt;boost/vmd/is_type.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_unary_hpp.html">Header &lt;boost/vmd/is_unary.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/not_equal_hpp.html">Header &lt;boost/vmd/not_equal.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/remove_hpp.html">Header &lt;boost/vmd/seq/remove.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/remove_hpp.html">Header &lt;boost/vmd/tuple/remove.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/size_hpp.html">Header &lt;boost/vmd/seq/size.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/size_hpp.html">Header &lt;boost/vmd/size.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/size_hpp.html">Header &lt;boost/vmd/tuple/size.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_array_hpp.html">Header &lt;boost/vmd/to_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_list_hpp.html">Header &lt;boost/vmd/to_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
<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>
<dd><dl></dl></dd>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_design.html">Design</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_compilers.html">Compilers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_history.html">History</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_ack.html">Acknowledgements</a></span></dt>
<dt><span class="section"><a href="index/s24.html">Index</a></span></dt>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="variadic_macro_data.vmd_intro"></a><a class="link" href="index.html#variadic_macro_data.vmd_intro" title="Introduction">Introduction</a>
</h2></div></div></div>
<p>
Welcome to the Variadic Macro Data library.
</p>
<p>
The Variadic Macro Data library, referred to hereafter as VMD for short, is
a library of variadic macros which provide enhancements to the functionality
in the Boost preprocessor library ( Boost PP ), especially as it relates to
preprocessor data types.
</p>
<p>
The preprocessor data types with which VMD has specific functionality are emptiness,
identifiers, numbers ( a subset of identifiers ), types ( a subset of identifiers
), Boost PP arrays, Boost PP lists, Boost PP seqs, Boost PP tuples, and sequences.
The first four are basic preprocessor data types while the latter five are
composite preprocessor data types. A sequence is zero or more of the other
preprocessor data types following each other.
</p>
<h4>
<a name="variadic_macro_data.vmd_intro.h0"></a>
<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
type examples</a>
</h4>
<div class="table">
<a name="variadic_macro_data.vmd_intro.dwe"></a><p class="title"><b>Table&#160;1.1.&#160;Data types with examples</b></p>
<div class="table-contents"><table class="table" summary="Data types with examples">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Type
</p>
</th>
<th>
<p>
Example
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
identifier
</p>
</td>
<td>
<p>
anyname
</p>
</td>
</tr>
<tr>
<td>
<p>
number
</p>
</td>
<td>
<p>
47
</p>
</td>
</tr>
<tr>
<td>
<p>
type
</p>
</td>
<td>
<p>
BOOST_VMD_TYPE_NUMBER
</p>
</td>
</tr>
<tr>
<td>
<p>
array
</p>
</td>
<td>
<p>
(4,(an_identifier,156,BOOST_VMD_TYPE_IDENTIFIER))
</p>
</td>
</tr>
<tr>
<td>
<p>
list
</p>
</td>
<td>
<p>
(78,(some_identifier,(BOOST_VMD_TYPE_TYPE,BOOST_PP_NIL)))
</p>
</td>
</tr>
<tr>
<td>
<p>
seq
</p>
</td>
<td>
<p>
(identifier)(89)(245)
</p>
</td>
</tr>
<tr>
<td>
<p>
tuple
</p>
</td>
<td>
<p>
(any_id,175,BOOST_VMD_TYPE_LIST,happy,21)
</p>
</td>
</tr>
<tr>
<td>
<p>
sequence
</p>
</td>
<td>
<p>
tree 59 (56,BOOST_VMD_TYPE_SEQ) (128)(fire)(clown) (47,(BOOST_VMD_TYPE_TUPLE,BOOST_PP_NIL))
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><p>
Emptiness is the lack of any preprocessing tokens. A macro which expands to
nothing, as in:
</p>
<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>
</pre>
<p>
is said to return emptiness. Conversely a macro could accept nothing when invoked,
such as in:
</p>
<pre class="programlisting"><span class="identifier">RETURN_NOTHING</span><span class="special">()</span>
</pre>
<p>
Finally emptiness can be part of any composite data type as in:
</p>
<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>
</pre>
<p>
where the second tuple element is empty.
</p>
<h4>
<a name="variadic_macro_data.vmd_intro.h1"></a>
<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
is the advantage ?</a>
</h4>
<p>
VMD can identify any of the preprocessor data types previously mentioned, and
can parse sequences into their individual preprocessor data types. You may
well ask why that is important.
</p>
<p>
In Boost PP macro programming a great deal of the control logic of designing
a macro is based on the support Boost PP has for numbers and testing for the
value of a number, in particular 0 and 1 to represent boolean choices. Essentially
Boost PP often uses the value of a number to control the logic in a macro's
design.
</p>
<p>
VMD does not attempt, in any way, to duplicate Boost PP's support for testing
the value of numbers or of the boolean 0 or 1 values, but just reuses that
functionality. What VMD offers, which goes beyond Boost PP, is a system for
deciphering the preprocessor data types, as well as comparing any of the preprocessor
data types for equality to any given value. This allows macro logic to be designed
in a more flexible way, relying on the type of data and/or the value of the
data. If this intrigues you, continue reading to understand how you can use
VMD to do macro programming.
</p>
<h4>
<a name="variadic_macro_data.vmd_intro.h2"></a>
<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
areas</a>
</h4>
<p>
The functionality of the library may be summed up as:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
Provide a better way of testing for and using empty parameters and empty
preprocessor data.
</li>
<li class="listitem">
Provide ways for testing/parsing for identifiers, numbers, types, tuples,
arrays, lists, and seqs.
</li>
<li class="listitem">
Provide ways for testing/parsing sequences of identifiers, numbers, types,
tuples, arrays, lists. and seqs.
</li>
<li class="listitem">
Provide some useful variadic macros not in Boost PP.
</li>
</ol></div>
<p>
The library is a header only library and all macros in the library are included
by a single header, whose name is 'vmd.hpp'. Individual headers may be used
for different functionality in the library and will be denoted when that functionality
is explained.
</p>
<p>
All the macros in the library begin with the sequence 'BOOST_VMD_' to distinguish
them from other macros the end-user might use. Therefore the end-user should
not use any C++ identifiers, whether in macros or otherwise, which being with
the sequence 'BOOST_VMD_'.
</p>
<p>
Use of the library is only dependent on Boost PP. The library also uses Boost
detail lightweight_test.hpp for its own tests.
</p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: August 14, 2019 at 12:05:24 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<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>
</body>
</html>