1 | /* |
2 | Copyright Rene Rivera 2005 |
3 | Copyright Rene Rivera 2008-2013 |
4 | Distributed under the Boost Software License, Version 1.0. |
5 | (See accompanying file LICENSE_1_0.txt or copy at |
6 | http://www.boost.org/LICENSE_1_0.txt) |
7 | */ |
8 | |
9 | #ifndef BOOST_PREDEF_VERSION_NUMBER_H |
10 | #define BOOST_PREDEF_VERSION_NUMBER_H |
11 | |
12 | /*` |
13 | [heading `BOOST_VERSION_NUMBER`] |
14 | |
15 | `` |
16 | BOOST_VERSION_NUMBER(major,minor,patch) |
17 | `` |
18 | |
19 | Defines standard version numbers, with these properties: |
20 | |
21 | * Decimal base whole numbers in the range \[0,1000000000). |
22 | The number range is designed to allow for a (2,2,5) triplet. |
23 | Which fits within a 32 bit value. |
24 | * The `major` number can be in the \[0,99\] range. |
25 | * The `minor` number can be in the \[0,99\] range. |
26 | * The `patch` number can be in the \[0,99999\] range. |
27 | * Values can be specified in any base. As the defined value |
28 | is an constant expression. |
29 | * Value can be directly used in both preprocessor and compiler |
30 | expressions for comparison to other similarly defined values. |
31 | * The implementation enforces the individual ranges for the |
32 | major, minor, and patch numbers. And values over the ranges |
33 | are truncated (modulo). |
34 | |
35 | */ |
36 | #define BOOST_VERSION_NUMBER(major,minor,patch) \ |
37 | ( (((major)%100)*10000000) + (((minor)%100)*100000) + ((patch)%100000) ) |
38 | |
39 | #define BOOST_VERSION_NUMBER_MAX \ |
40 | BOOST_VERSION_NUMBER(99,99,99999) |
41 | |
42 | #define BOOST_VERSION_NUMBER_ZERO \ |
43 | BOOST_VERSION_NUMBER(0,0,0) |
44 | |
45 | #define BOOST_VERSION_NUMBER_MIN \ |
46 | BOOST_VERSION_NUMBER(0,0,1) |
47 | |
48 | #define BOOST_VERSION_NUMBER_AVAILABLE \ |
49 | BOOST_VERSION_NUMBER_MIN |
50 | |
51 | #define BOOST_VERSION_NUMBER_NOT_AVAILABLE \ |
52 | BOOST_VERSION_NUMBER_ZERO |
53 | |
54 | #endif |
55 | |