Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-17 08:28:31

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