diff options
Diffstat (limited to 'boost/predef/version_number.h')
-rw-r--r-- | boost/predef/version_number.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/boost/predef/version_number.h b/boost/predef/version_number.h index 3903a36b70..44942709c7 100644 --- a/boost/predef/version_number.h +++ b/boost/predef/version_number.h @@ -1,5 +1,5 @@ /* -Copyright Rene Rivera 2005, 2008-2013 +Copyright Rene Rivera 2005-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -50,4 +50,23 @@ Defines standard version numbers, with these properties: #define BOOST_VERSION_NUMBER_NOT_AVAILABLE \ BOOST_VERSION_NUMBER_ZERO +/*` +`` +BOOST_VERSION_NUMBER_MAJOR(N), BOOST_VERSION_NUMBER_MINOR(N), BOOST_VERSION_NUMBER_PATCH(N) +`` + +The macros extract the major, minor, and patch portion from a well formed +version number resulting in a preprocessor expression in the range of +\[0,99\] or \[0,99999\] for the major and minor, or patch numbers +respectively. +*/ +#define BOOST_VERSION_NUMBER_MAJOR(N) \ + ( ((N)/10000000)%100 ) + +#define BOOST_VERSION_NUMBER_MINOR(N) \ + ( ((N)/100000)%100 ) + +#define BOOST_VERSION_NUMBER_PATCH(N) \ + ( (N)%100000 ) + #endif |