Blame view

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