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