versioning.qbk 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. [section Versioning]
  2. This section describes how the library is prepared for supporting multiple
  3. (not backward compatible) changes.
  4. [section Template classes]
  5. The elements of the library are defined in the `boost::metaparse::v1`
  6. namespace. For example the `one_char` class is
  7. `boost::metaparse::v1::one_char` and is available after including the
  8. `<boost/metaparse/v1/one_char.hpp>` header file.
  9. At the same time the library provides the `<boost/metaparse/one_char.hpp>`
  10. header file which includes `<boost/metaparse/v1/one_char.hpp>` and contains
  11. the following:
  12. namespace boost
  13. {
  14. namespace metaparse
  15. {
  16. using v1::one_char;
  17. }
  18. }
  19. This makes it possible to use `one_char` as `boost::metaparse::one_char`.
  20. Future versions of the library may provide other namespaces (eg. `v2`). The
  21. header files in `<boost/metaparse/...>` provide the latest version of the
  22. library. To always get version `v1`, one should use header files in
  23. `<boost/metaparse/v1/...>`.
  24. The library does not use inline namespaces to work on compilers that do not
  25. support them.
  26. [endsect]
  27. [section Macros]
  28. Macros defined by the library are prefixed with `BOOST_METAPARSE_V1_`. For
  29. example `BOOST_METAPARSE_V1_STRING`. It is defined in the
  30. `<boost/metaparse/v1/string.hpp>` header file. The library provides the
  31. `<boost/metaparse/string.hpp>` header file as well, which includes the
  32. definition of this macro and provides the following definition:
  33. #define BOOST_METAPARSE_STRING BOOST_METAPARSE_V1_STRING
  34. This makes it possible to use the macro as `BOOST_METAPARSE_STRING`. Future
  35. versions of the library may define other versions of this macro (eg.
  36. `BOOST_METAPARSE_V2_STRING`). `BOOST_METAPARSE_STRING` will refer to the latest
  37. version.
  38. This versioning does not affect macros that may be overridden by the code using
  39. the library. (eg. `BOOST_METAPARSE_LIMIT_STRING_SIZE`)
  40. [endsect]
  41. [endsect]