vmd_design.qbk 2.9 KB

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