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