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