• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_design Design]
9
10The initial impetus for creating this library was entirely practical. I had been
11working on another library of macro functionality, which used Boost PP
12functionality, and I realized that if I could use variadic macros with
13my other library, the end-user usability for that library would be easier.
14Therefore the initial main design goal of this library was to interoperate variadic macro data
15with Boost PP in the easiest and clearest way possible.
16
17This led to the original versions of the library as an impetus for
18adding variadic macro data support to Boost PP. While this was being done,
19but the variadic macro data support had not yet been finalized in Boost PP,
20I still maintained the library in two modes, either its own variadic data
21functionality or deferring to the implementation of variadic macros in the
22Boost PP library.
23
24Once support for variadic data had been added to Boost PP I stripped
25down the functionality of this library to only include variadic macro
26support for functionality which was an adjunct to the support in Boost PP.
27This functionality might be seen as experimental, since it largely relied on a macro
28which tested for empty input which Paul Mensonides, the author of Boost PP, had
29published on the Internet, and which by the very nature of the C++ preprocessor
30is slightly flawed but which was the closest approximation of such functionality
31which I believed could be made. I had to tweak this macro somewhat for the Visual C++
32preprocessor, whose conformance to the C++ standard for macro processing is notably
33incorrect in a number of areas. But I still felt this functionality could be used
34in select situations and might be useful to others. Using this functionality
35I was able to build up some other macros which tested for the various Boost PP
36data types. I also was able to add in functionality, based on Paul Mendsonides
37excellent work, for handling tuples in preprocessing data.
38
39All of this particular functionality is impossible to do effectively
40without the use of variadic macros. But I had kept these features at a
41minimum because of the difficulty of using variadic macros with compilers,
42most notably Visual C++, whose implementation of variadic macros is
43substandard and therefore very difficult to get to work correctly when
44variadic macros must be used.
45
46I then realized that if I am going to have a library which takes advantage
47of variadic macros I should see what I could do in the area of parsing
48preprocessor data. This has led to a reorganization of the library as
49a set of macros largely for parsing preprocessor data. All of this is now built
50on top of my use of the almost perfect checking for emptiness which Paul
51Mensonides originally created.
52
53[endsect]
54