Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Next

Chapter 1. The Variadic Macro Data Library 1.9

Edward Diener

Table of Contents

Introduction
Naming conventions
Why and how to use
Using variadic macros
Visual C++ define
Functional groups
Data types
Specific macros for working with data types
Emptiness
Macro constraints
Identifiers
Numbers
Types
VMD and Boost PP data types
Identifying data types
Generic macros for working with data types
Parsing sequences
Converting sequences
Accessing a sequence element
Getting the type of data
Testing for equality and inequality
Macros with modifiers
Return type modifiers
Filtering modifiers
Identifier modifiers
Splitting modifiers
Index modifiers
Modifiers and the single-element sequence
Identifier subtypes
Useful variadic macros not in Boost PP
Asserting and data types
Generating emptiness and identity
Functionality for "empty" seqs and tuples
Controlling internal usage
Boost PP re-entrant versions
Input as dynamic types
Visual C++ gotchas in VMD
Version 1.7 to 1.8 conversion
Examples using VMD functionality
Variadic Macro Data Reference
Header <boost/vmd/array/to_seq.hpp>
Header <boost/vmd/list/to_seq.hpp>
Header <boost/vmd/to_seq.hpp>
Header <boost/vmd/tuple/to_seq.hpp>
Header <boost/vmd/array/to_tuple.hpp>
Header <boost/vmd/list/to_tuple.hpp>
Header <boost/vmd/seq/to_tuple.hpp>
Header <boost/vmd/to_tuple.hpp>
Header <boost/vmd/assert.hpp>
Header <boost/vmd/assert_is_array.hpp>
Header <boost/vmd/assert_is_empty.hpp>
Header <boost/vmd/assert_is_identifier.hpp>
Header <boost/vmd/assert_is_list.hpp>
Header <boost/vmd/assert_is_number.hpp>
Header <boost/vmd/assert_is_seq.hpp>
Header <boost/vmd/assert_is_tuple.hpp>
Header <boost/vmd/assert_is_type.hpp>
Header <boost/vmd/elem.hpp>
Header <boost/vmd/empty.hpp>
Header <boost/vmd/enum.hpp>
Header <boost/vmd/equal.hpp>
Header <boost/vmd/get_type.hpp>
Header <boost/vmd/identity.hpp>
Header <boost/vmd/is_array.hpp>
Header <boost/vmd/is_empty.hpp>
Header <boost/vmd/is_empty_array.hpp>
Header <boost/vmd/is_empty_list.hpp>
Header <boost/vmd/is_identifier.hpp>
Header <boost/vmd/is_list.hpp>
Header <boost/vmd/is_multi.hpp>
Header <boost/vmd/is_number.hpp>
Header <boost/vmd/is_parens_empty.hpp>
Header <boost/vmd/is_seq.hpp>
Header <boost/vmd/is_tuple.hpp>
Header <boost/vmd/is_type.hpp>
Header <boost/vmd/is_unary.hpp>
Header <boost/vmd/not_equal.hpp>
Header <boost/vmd/seq/is_vmd_seq.hpp>
Header <boost/vmd/seq/pop_back.hpp>
Header <boost/vmd/tuple/pop_back.hpp>
Header <boost/vmd/seq/pop_front.hpp>
Header <boost/vmd/tuple/pop_front.hpp>
Header <boost/vmd/seq/push_back.hpp>
Header <boost/vmd/tuple/push_back.hpp>
Header <boost/vmd/seq/push_front.hpp>
Header <boost/vmd/tuple/push_front.hpp>
Header <boost/vmd/seq/remove.hpp>
Header <boost/vmd/tuple/remove.hpp>
Header <boost/vmd/seq/size.hpp>
Header <boost/vmd/size.hpp>
Header <boost/vmd/tuple/size.hpp>
Header <boost/vmd/seq/to_array.hpp>
Header <boost/vmd/to_array.hpp>
Header <boost/vmd/tuple/to_array.hpp>
Header <boost/vmd/seq/to_list.hpp>
Header <boost/vmd/to_list.hpp>
Header <boost/vmd/tuple/to_list.hpp>
Header <boost/vmd/tuple/is_vmd_tuple.hpp>
Design
Compilers
History
Acknowledgements
Index

Welcome to version 1.9 of the Variadic Macro Data library.

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".

The functionality of the library may be summed up as:

  1. Provide a better way of testing for and using empty parameters and empty preprocessor data.
  2. Provide ways for testing/parsing for identifiers, numbers, types, tuples, arrays, lists, and seqs.
  3. Provide ways for testing/parsing sequences of identifiers, numbers, types, tuples, arrays, lists. and seqs.
  4. Provide some useful variadic macros not in Boost PP.

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.

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_'.

Use of the library is only dependent on Boost PP. The library also uses Boost detail lightweight_test.hpp for its own tests.

Last revised: May 05, 2016 at 21:21:59 GMT


Next