|
|
|||
File indexing completed on 2025-12-15 09:53:11
0001 /*! 0002 @file 0003 Defines macros for tracking the version of the library. 0004 0005 Copyright Louis Dionne 2013-2022 0006 Distributed under the Boost Software License, Version 1.0. 0007 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) 0008 */ 0009 0010 #ifndef BOOST_HANA_VERSION_HPP 0011 #define BOOST_HANA_VERSION_HPP 0012 0013 //! @internal 0014 //! Transforms a (version, revision, patchlevel) triple into a number of the 0015 //! form 0xVVRRPPPP to allow comparing versions in a normalized way. 0016 //! 0017 //! See http://sourceforge.net/p/predef/wiki/VersionNormalization. 0018 #define BOOST_HANA_CONFIG_VERSION(version, revision, patch) \ 0019 (((version) << 24) + ((revision) << 16) + (patch)) 0020 0021 //! @ingroup group-config 0022 //! Macro expanding to the major version of the library, i.e. the `x` in `x.y.z`. 0023 #define BOOST_HANA_MAJOR_VERSION 1 0024 0025 //! @ingroup group-config 0026 //! Macro expanding to the minor version of the library, i.e. the `y` in `x.y.z`. 0027 #define BOOST_HANA_MINOR_VERSION 8 0028 0029 //! @ingroup group-config 0030 //! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`. 0031 #define BOOST_HANA_PATCH_VERSION 0 0032 0033 //! @ingroup group-config 0034 //! Macro expanding to the full version of the library, in hexadecimal 0035 //! representation. 0036 //! 0037 //! Specifically, `BOOST_HANA_VERSION` expands to an hexadecimal number of the 0038 //! form 0xVVRRPPPP, where `VV` is the major version of the library, `RR` is 0039 //! the minor version and `PPPP` is the patch level. This allows the version 0040 //! of the library to be compared: 0041 //! @snippet example/version.cpp main 0042 //! 0043 //! 0044 //! @note 0045 //! The major, minor and patch versions of the library are also available 0046 //! individually with the `BOOST_HANA_{MAJOR,MINOR,PATCH}_VERSION` macros. 0047 #define BOOST_HANA_VERSION \ 0048 BOOST_HANA_CONFIG_VERSION(BOOST_HANA_MAJOR_VERSION, \ 0049 BOOST_HANA_MINOR_VERSION, \ 0050 BOOST_HANA_PATCH_VERSION) \ 0051 /**/ 0052 0053 #endif // !BOOST_HANA_VERSION_HPP
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|