|
||||
File indexing completed on 2025-01-18 09:48:06
0001 /* 0002 Copyright Rene Rivera 2017 0003 Distributed under the Boost Software License, Version 1.0. 0004 (See accompanying file LICENSE_1_0.txt or copy at 0005 http://www.boost.org/LICENSE_1_0.txt) 0006 */ 0007 0008 #ifndef BOOST_PREDEF_WORKAROUND_H 0009 #define BOOST_PREDEF_WORKAROUND_H 0010 0011 /* tag::reference[] 0012 0013 = `BOOST_PREDEF_WORKAROUND` 0014 0015 [source] 0016 ---- 0017 BOOST_PREDEF_WORKAROUND(symbol,comp,major,minor,patch) 0018 ---- 0019 0020 Usage: 0021 0022 [source] 0023 ---- 0024 #if BOOST_PREDEF_WORKAROUND(BOOST_COMP_CLANG,<,3,0,0) 0025 // Workaround for old clang compilers.. 0026 #endif 0027 ---- 0028 0029 Defines a comparison against two version numbers that depends on the definion 0030 of `BOOST_STRICT_CONFIG`. When `BOOST_STRICT_CONFIG` is defined this will expand 0031 to a value convertible to `false`. Which has the effect of disabling all code 0032 conditionally guarded by `BOOST_PREDEF_WORKAROUND`. When `BOOST_STRICT_CONFIG` 0033 is undefine this expand to test the given `symbol` version value with the 0034 `comp` comparison against `BOOST_VERSION_NUMBER(major,minor,patch)`. 0035 0036 */ // end::reference[] 0037 #ifdef BOOST_STRICT_CONFIG 0038 # define BOOST_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) (0) 0039 #else 0040 # include <boost/predef/version_number.h> 0041 # define BOOST_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) \ 0042 ( (symbol) != (0) ) && \ 0043 ( (symbol) comp (BOOST_VERSION_NUMBER( (major) , (minor) , (patch) )) ) 0044 #endif 0045 0046 /* tag::reference[] 0047 0048 = `BOOST_PREDEF_TESTED_AT` 0049 0050 [source] 0051 ---- 0052 BOOST_PREDEF_TESTED_AT(symbol,major,minor,patch) 0053 ---- 0054 0055 Usage: 0056 0057 [source] 0058 ---- 0059 #if BOOST_PREDEF_TESTED_AT(BOOST_COMP_CLANG,3,5,0) 0060 // Needed for clang, and last checked for 3.5.0. 0061 #endif 0062 ---- 0063 0064 Defines a comparison against two version numbers that depends on the definion 0065 of `BOOST_STRICT_CONFIG` and `BOOST_DETECT_OUTDATED_WORKAROUNDS`. 0066 When `BOOST_STRICT_CONFIG` is defined this will expand to a value convertible 0067 to `false`. Which has the effect of disabling all code 0068 conditionally guarded by `BOOST_PREDEF_TESTED_AT`. When `BOOST_STRICT_CONFIG` 0069 is undefined this expand to either: 0070 0071 * A value convertible to `true` when `BOOST_DETECT_OUTDATED_WORKAROUNDS` is not 0072 defined. 0073 * A value convertible `true` when the expansion of 0074 `BOOST_PREDEF_WORKAROUND(symbol, <=, major, minor, patch)` is `true` and 0075 `BOOST_DETECT_OUTDATED_WORKAROUNDS` is defined. 0076 * A compile error when the expansion of 0077 `BOOST_PREDEF_WORKAROUND(symbol, >, major, minor, patch)` is true and 0078 `BOOST_DETECT_OUTDATED_WORKAROUNDS` is defined. 0079 0080 */ // end::reference[] 0081 #ifdef BOOST_STRICT_CONFIG 0082 # define BOOST_PREDEF_TESTED_AT(symbol, major, minor, patch) (0) 0083 #else 0084 # ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS 0085 # define BOOST_PREDEF_TESTED_AT(symbol, major, minor, patch) ( \ 0086 BOOST_PREDEF_WORKAROUND(symbol, <=, major, minor, patch) \ 0087 ? 1 \ 0088 : (1%0) ) 0089 # else 0090 # define BOOST_PREDEF_TESTED_AT(symbol, major, minor, patch) \ 0091 ( (symbol) >= BOOST_VERSION_NUMBER_AVAILABLE ) 0092 # endif 0093 #endif 0094 0095 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |