Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:44:52

0001 #ifndef BOOST_LEAF_CONFIG_HPP_INCLUDED
0002 #define BOOST_LEAF_CONFIG_HPP_INCLUDED
0003 
0004 // Copyright 2018-2023 Emil Dotchevski and Reverge Studios, Inc.
0005 
0006 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0007 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 // The following is based in part on Boost Config.
0010 
0011 // (C) Copyright John Maddock 2001 - 2003.
0012 // (C) Copyright Martin Wille 2003.
0013 // (C) Copyright Guillaume Melquiond 2003.
0014 
0015 #ifndef BOOST_LEAF_ASSERT
0016 #   include <cassert>
0017 #   define BOOST_LEAF_ASSERT assert
0018 #endif
0019 
0020 ////////////////////////////////////////
0021 
0022 #ifdef BOOST_LEAF_DIAGNOSTICS
0023 #   warning BOOST_LEAF_DIAGNOSTICS has been renamed to BOOST_LEAF_CFG_DIAGNOSTICS.
0024 #   define BOOST_LEAF_CFG_DIAGNOSTICS BOOST_LEAF_DIAGNOSTICS
0025 #endif
0026 
0027 ////////////////////////////////////////
0028 
0029 #ifdef BOOST_LEAF_TLS_FREERTOS
0030 
0031 #   ifndef BOOST_LEAF_EMBEDDED
0032 #       define BOOST_LEAF_EMBEDDED
0033 #   endif
0034 
0035 #endif
0036 
0037 ////////////////////////////////////////
0038 
0039 #ifdef BOOST_LEAF_EMBEDDED
0040 
0041 #   ifndef BOOST_LEAF_CFG_DIAGNOSTICS
0042 #       define BOOST_LEAF_CFG_DIAGNOSTICS 0
0043 #   endif
0044 
0045 #   ifndef BOOST_LEAF_CFG_STD_SYSTEM_ERROR
0046 #       define BOOST_LEAF_CFG_STD_SYSTEM_ERROR 0
0047 #   endif
0048 
0049 #   ifndef BOOST_LEAF_CFG_STD_STRING
0050 #       define BOOST_LEAF_CFG_STD_STRING 0
0051 #   endif
0052 
0053 #   ifndef BOOST_LEAF_CFG_CAPTURE
0054 #       define BOOST_LEAF_CFG_CAPTURE 0
0055 #   endif
0056 
0057 #endif
0058 
0059 ////////////////////////////////////////
0060 
0061 #ifndef BOOST_LEAF_CFG_DIAGNOSTICS
0062 #   define BOOST_LEAF_CFG_DIAGNOSTICS 1
0063 #endif
0064 
0065 #ifndef BOOST_LEAF_CFG_STD_SYSTEM_ERROR
0066 #   define BOOST_LEAF_CFG_STD_SYSTEM_ERROR 1
0067 #endif
0068 
0069 #ifndef BOOST_LEAF_CFG_STD_STRING
0070 #   define BOOST_LEAF_CFG_STD_STRING 1
0071 #endif
0072 
0073 #ifndef BOOST_LEAF_CFG_CAPTURE
0074 #   define BOOST_LEAF_CFG_CAPTURE 1
0075 #endif
0076 
0077 #ifndef BOOST_LEAF_CFG_WIN32
0078 #   define BOOST_LEAF_CFG_WIN32 0
0079 #endif
0080 
0081 #ifndef BOOST_LEAF_CFG_GNUC_STMTEXPR
0082 #   ifdef __GNUC__
0083 #       define BOOST_LEAF_CFG_GNUC_STMTEXPR 1
0084 #   else
0085 #       define BOOST_LEAF_CFG_GNUC_STMTEXPR 0
0086 #   endif
0087 #endif
0088 
0089 #if BOOST_LEAF_CFG_DIAGNOSTICS!=0 && BOOST_LEAF_CFG_DIAGNOSTICS!=1
0090 #   error BOOST_LEAF_CFG_DIAGNOSTICS must be 0 or 1.
0091 #endif
0092 
0093 #if BOOST_LEAF_CFG_STD_SYSTEM_ERROR!=0 && BOOST_LEAF_CFG_STD_SYSTEM_ERROR!=1
0094 #   error BOOST_LEAF_CFG_STD_SYSTEM_ERROR must be 0 or 1.
0095 #endif
0096 
0097 #if BOOST_LEAF_CFG_STD_STRING!=0 && BOOST_LEAF_CFG_STD_STRING!=1
0098 #   error BOOST_LEAF_CFG_STD_STRING must be 0 or 1.
0099 #endif
0100 
0101 #if BOOST_LEAF_CFG_CAPTURE!=0 && BOOST_LEAF_CFG_CAPTURE!=1
0102 #   error BOOST_LEAF_CFG_CAPTURE must be 0 or 1.
0103 #endif
0104 
0105 #if BOOST_LEAF_CFG_DIAGNOSTICS && !BOOST_LEAF_CFG_STD_STRING
0106 #   error BOOST_LEAF_CFG_DIAGNOSTICS requires the use of std::string
0107 #endif
0108 
0109 #if BOOST_LEAF_CFG_WIN32!=0 && BOOST_LEAF_CFG_WIN32!=1
0110 #   error BOOST_LEAF_CFG_WIN32 must be 0 or 1.
0111 #endif
0112 
0113 #if BOOST_LEAF_CFG_GNUC_STMTEXPR!=0 && BOOST_LEAF_CFG_GNUC_STMTEXPR!=1
0114 #   error BOOST_LEAF_CFG_GNUC_STMTEXPR must be 0 or 1.
0115 #endif
0116 
0117 #if BOOST_LEAF_CFG_STD_SYSTEM_ERROR && !BOOST_LEAF_CFG_STD_STRING
0118 #   error BOOST_LEAF_CFG_STD_SYSTEM_ERROR != 0 requires BOOST_LEAF_CFG_STD_STRING != 0
0119 #endif
0120 
0121 ////////////////////////////////////////
0122 
0123 // Configure BOOST_LEAF_NO_EXCEPTIONS, unless already #defined
0124 #ifndef BOOST_LEAF_NO_EXCEPTIONS
0125 
0126 #   if defined(__clang__) && !defined(__ibmxl__)
0127 //  Clang C++ emulates GCC, so it has to appear early.
0128 
0129 #       if !__has_feature(cxx_exceptions)
0130 #           define BOOST_LEAF_NO_EXCEPTIONS
0131 #       endif
0132 
0133 #   elif defined(__DMC__)
0134 //  Digital Mars C++
0135 
0136 #       if !defined(_CPPUNWIND)
0137 #           define BOOST_LEAF_NO_EXCEPTIONS
0138 #       endif
0139 
0140 #   elif defined(__GNUC__) && !defined(__ibmxl__)
0141 //  GNU C++:
0142 
0143 #       if !defined(__EXCEPTIONS)
0144 #           define BOOST_LEAF_NO_EXCEPTIONS
0145 #       endif
0146 
0147 #   elif defined(__KCC)
0148 //  Kai C++
0149 
0150 #       if !defined(_EXCEPTIONS)
0151 #           define BOOST_LEAF_NO_EXCEPTIONS
0152 #       endif
0153 
0154 #   elif defined(__CODEGEARC__)
0155 //  CodeGear - must be checked for before Borland
0156 
0157 #       if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
0158 #           define BOOST_LEAF_NO_EXCEPTIONS
0159 #       endif
0160 
0161 #   elif defined(__BORLANDC__)
0162 //  Borland
0163 
0164 #       if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
0165 #           define BOOST_LEAF_NO_EXCEPTIONS
0166 #       endif
0167 
0168 #   elif defined(__MWERKS__)
0169 //  Metrowerks CodeWarrior
0170 
0171 #       if !__option(exceptions)
0172 #           define BOOST_LEAF_NO_EXCEPTIONS
0173 #       endif
0174 
0175 #   elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
0176 //  IBM z/OS XL C/C++
0177 
0178 #       if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
0179 #           define BOOST_LEAF_NO_EXCEPTIONS
0180 #       endif
0181 
0182 #   elif defined(__ibmxl__)
0183 //  IBM XL C/C++ for Linux (Little Endian)
0184 
0185 #       if !__has_feature(cxx_exceptions)
0186 #           define BOOST_LEAF_NO_EXCEPTIONS
0187 #       endif
0188 
0189 #   elif defined(_MSC_VER)
0190 //  Microsoft Visual C++
0191 //
0192 //  Must remain the last #elif since some other vendors (Metrowerks, for
0193 //  example) also #define _MSC_VER
0194 
0195 #       if !_CPPUNWIND
0196 #           define BOOST_LEAF_NO_EXCEPTIONS
0197 #       endif
0198 #   endif
0199 
0200 #endif
0201 
0202 ////////////////////////////////////////
0203 
0204 #ifdef _MSC_VER
0205 #   define BOOST_LEAF_ALWAYS_INLINE __forceinline
0206 #else
0207 #   define BOOST_LEAF_ALWAYS_INLINE __attribute__((always_inline)) inline
0208 #endif
0209 
0210 ////////////////////////////////////////
0211 
0212 #ifndef BOOST_LEAF_NODISCARD
0213 #   if __cplusplus >= 201703L
0214 #       define BOOST_LEAF_NODISCARD [[nodiscard]]
0215 #   else
0216 #       define BOOST_LEAF_NODISCARD
0217 #   endif
0218 #endif
0219 
0220 ////////////////////////////////////////
0221 
0222 #ifndef BOOST_LEAF_CONSTEXPR
0223 #   if __cplusplus > 201402L
0224 #       define BOOST_LEAF_CONSTEXPR constexpr
0225 #   else
0226 #       define BOOST_LEAF_CONSTEXPR
0227 #   endif
0228 #endif
0229 
0230 ////////////////////////////////////////
0231 
0232 #ifndef BOOST_LEAF_NO_EXCEPTIONS
0233 #   include <exception>
0234 #   if (defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L) || (defined(_MSC_VER) && _MSC_VER >= 1900)
0235 #       define BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS 1
0236 #   else
0237 #       define BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS 0
0238 #   endif
0239 #endif
0240 
0241 ////////////////////////////////////////
0242 
0243 #ifdef __GNUC__
0244 #   define BOOST_LEAF_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
0245 #else
0246 #   define BOOST_LEAF_SYMBOL_VISIBLE
0247 #endif
0248 
0249 ////////////////////////////////////////
0250 
0251 #if defined(__GNUC__) && !(defined(__clang__) || defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) < 409
0252 #   ifndef BOOST_LEAF_NO_CXX11_REF_QUALIFIERS
0253 #       define BOOST_LEAF_NO_CXX11_REF_QUALIFIERS
0254 #   endif
0255 #endif
0256 
0257 ////////////////////////////////////////
0258 
0259 // Configure TLS access
0260 #include <boost/leaf/config/tls.hpp>
0261 
0262 ////////////////////////////////////////
0263 
0264 #endif