File indexing completed on 2025-12-15 09:53:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
0012 #define BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
0013
0014 #ifndef BOOST_CONFIG_HPP
0015 # include <boost/config.hpp>
0016 #endif
0017
0018 #if defined(BOOST_HAS_PRAGMA_ONCE)
0019 # pragma once
0020 #endif
0021
0022 #ifndef BOOST_CONFIG_HPP
0023 #include <boost/config.hpp>
0024 #endif
0025
0026
0027 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1900)
0028 #define BOOST_INTRUSIVE_VARIADIC_TEMPLATES
0029 #endif
0030
0031 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0032 #define BOOST_INTRUSIVE_PERFECT_FORWARDING
0033 #endif
0034
0035
0036 #define BOOST_INTRUSIVE_IMPDEF(TYPE) TYPE
0037 #define BOOST_INTRUSIVE_SEEDOC(TYPE) TYPE
0038 #define BOOST_INTRUSIVE_DOC1ST(TYPE1, TYPE2) TYPE2
0039 #define BOOST_INTRUSIVE_I ,
0040 #define BOOST_INTRUSIVE_DOCIGN(T1) T1
0041
0042
0043
0044 #if defined(BOOST_INTRUSIVE_DISABLE_FORCEINLINE)
0045 #define BOOST_INTRUSIVE_FORCEINLINE inline
0046 #elif defined(BOOST_INTRUSIVE_FORCEINLINE_IS_BOOST_FORCELINE)
0047 #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
0048 #elif defined(BOOST_MSVC) && (_MSC_VER < 1900 || defined(_DEBUG))
0049
0050 #define BOOST_INTRUSIVE_FORCEINLINE inline
0051 #elif defined(BOOST_CLANG) || (defined(BOOST_GCC) && ((__GNUC__ <= 5) || defined(__MINGW32__)))
0052
0053
0054
0055
0056 #define BOOST_INTRUSIVE_FORCEINLINE inline
0057 #else
0058 #define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
0059 #endif
0060
0061 #if !(defined BOOST_NO_EXCEPTIONS)
0062 # define BOOST_INTRUSIVE_TRY { try
0063 # define BOOST_INTRUSIVE_CATCH(x) catch(x)
0064 # define BOOST_INTRUSIVE_RETHROW throw;
0065 # define BOOST_INTRUSIVE_CATCH_END }
0066 #else
0067 # if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
0068 # define BOOST_INTRUSIVE_TRY { if (true)
0069 # define BOOST_INTRUSIVE_CATCH(x) else if (false)
0070 # else
0071
0072 # define BOOST_INTRUSIVE_TRY { \
0073 __pragma(warning(push)) \
0074 __pragma(warning(disable: 4127)) \
0075 if (true) \
0076 __pragma(warning(pop))
0077 # define BOOST_INTRUSIVE_CATCH(x) else \
0078 __pragma(warning(push)) \
0079 __pragma(warning(disable: 4127)) \
0080 if (false) \
0081 __pragma(warning(pop))
0082 # endif
0083 # define BOOST_INTRUSIVE_RETHROW
0084 # define BOOST_INTRUSIVE_CATCH_END }
0085 #endif
0086
0087 #ifndef BOOST_NO_CXX11_STATIC_ASSERT
0088 # ifndef BOOST_NO_CXX11_VARIADIC_MACROS
0089 # define BOOST_INTRUSIVE_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
0090 # else
0091 # define BOOST_INTRUSIVE_STATIC_ASSERT( B ) static_assert(B, #B)
0092 # endif
0093 #else
0094 namespace boost {
0095 namespace intrusive {
0096 namespace detail {
0097
0098 template<bool B>
0099 struct STATIC_ASSERTION_FAILURE;
0100
0101 template<>
0102 struct STATIC_ASSERTION_FAILURE<true>{};
0103
0104 template<unsigned> struct static_assert_test {};
0105
0106 }}}
0107
0108 #define BOOST_INTRUSIVE_STATIC_ASSERT(B) \
0109 typedef ::boost::intrusive::detail::static_assert_test<\
0110 (unsigned)sizeof(::boost::intrusive::detail::STATIC_ASSERTION_FAILURE<bool(B)>)>\
0111 BOOST_JOIN(boost_intrusive_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
0112
0113 #endif
0114
0115
0116
0117
0118 #if defined(BOOST_GCC) && (BOOST_GCC >= 140000)
0119 # define BOOST_INTRUSIVE_NO_DANGLING __attribute__((no_dangling))
0120 #else
0121 # define BOOST_INTRUSIVE_NO_DANGLING
0122 #endif
0123
0124
0125 #endif