File indexing completed on 2025-10-31 08:44:56
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 #ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
0012 #define BOOST_MOVE_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 #if    !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
0023    #define BOOST_MOVE_PERFECT_FORWARDING
0024 #endif
0025 
0026 #if defined(__has_feature)
0027    #define BOOST_MOVE_HAS_FEATURE __has_feature
0028 #else
0029    #define BOOST_MOVE_HAS_FEATURE(x) 0
0030 #endif
0031 
0032 #if BOOST_MOVE_HAS_FEATURE(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
0033    #define BOOST_MOVE_ADDRESS_SANITIZER_ON
0034 #endif
0035 
0036 
0037 #define BOOST_MOVE_IMPDEF(TYPE) TYPE
0038 #define BOOST_MOVE_SEEDOC(TYPE) TYPE
0039 #define BOOST_MOVE_DOC0PTR(TYPE) TYPE
0040 #define BOOST_MOVE_DOC1ST(TYPE1, TYPE2) TYPE2
0041 #define BOOST_MOVE_I ,
0042 #define BOOST_MOVE_DOCIGN(T1) T1
0043 
0044 #if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__)
0045    
0046    #define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
0047 #elif defined(_MSC_VER) && (_MSC_VER == 1600)
0048    
0049    #define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
0050    #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
0051 #elif defined(_MSC_VER) && (_MSC_VER == 1700)
0052    #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
0053 #endif
0054 
0055 
0056 
0057 #if defined(BOOST_MOVE_DISABLE_FORCEINLINE)
0058    #define BOOST_MOVE_FORCEINLINE inline
0059 #elif defined(BOOST_MOVE_FORCEINLINE_IS_BOOST_FORCELINE)
0060    #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
0061 #elif defined(BOOST_MSVC) && (_MSC_VER < 1900 || defined(_DEBUG))
0062    
0063    #define BOOST_MOVE_FORCEINLINE inline
0064 #elif defined(BOOST_CLANG) || (defined(BOOST_GCC) && ((__GNUC__ <= 5) || defined(__MINGW32__)))
0065    
0066    
0067    
0068    
0069    #define BOOST_MOVE_FORCEINLINE inline
0070 #else
0071    #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
0072 #endif
0073 
0074 namespace boost {
0075 namespace movelib {
0076 
0077 template <typename T1>
0078 BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore(T1 const&)
0079 {}
0080 
0081 }} 
0082 
0083 #if !(defined BOOST_NO_EXCEPTIONS)
0084 #    define BOOST_MOVE_TRY { try
0085 #    define BOOST_MOVE_CATCH(x) catch(x)
0086 #    define BOOST_MOVE_RETHROW throw;
0087 #    define BOOST_MOVE_CATCH_END }
0088 #else
0089 #    if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
0090 #        define BOOST_MOVE_TRY { if (true)
0091 #        define BOOST_MOVE_CATCH(x) else if (false)
0092 #    else
0093 
0094 #        define BOOST_MOVE_TRY { \
0095              __pragma(warning(push)) \
0096              __pragma(warning(disable: 4127)) \
0097              if (true) \
0098              __pragma(warning(pop))
0099 #        define BOOST_MOVE_CATCH(x) else \
0100              __pragma(warning(push)) \
0101              __pragma(warning(disable: 4127)) \
0102              if (false) \
0103              __pragma(warning(pop))
0104 #    endif
0105 #    define BOOST_MOVE_RETHROW
0106 #    define BOOST_MOVE_CATCH_END }
0107 #endif
0108 
0109 #ifndef BOOST_NO_CXX11_STATIC_ASSERT
0110 #  ifndef BOOST_NO_CXX11_VARIADIC_MACROS
0111 #     define BOOST_MOVE_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
0112 #  else
0113 #     define BOOST_MOVE_STATIC_ASSERT( B ) static_assert(B, #B)
0114 #  endif
0115 #else
0116 namespace boost {
0117 namespace move_detail {
0118 
0119 template<bool B>
0120 struct STATIC_ASSERTION_FAILURE;
0121 
0122 template<>
0123 struct STATIC_ASSERTION_FAILURE<true>{};
0124 
0125 template<unsigned> struct static_assert_test {};
0126 
0127 }}
0128 
0129 #define BOOST_MOVE_STATIC_ASSERT(B) \
0130          typedef ::boost::move_detail::static_assert_test<\
0131             (unsigned)sizeof(::boost::move_detail::STATIC_ASSERTION_FAILURE<bool(B)>)>\
0132                BOOST_JOIN(boost_move_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
0133 
0134 #endif
0135 
0136 #if !defined(__has_cpp_attribute) || defined(__CUDACC__)
0137 #define BOOST_MOVE_HAS_MSVC_ATTRIBUTE(ATTR) 0
0138 #else
0139 #define BOOST_MOVE_HAS_MSVC_ATTRIBUTE(ATTR) __has_cpp_attribute(msvc::ATTR)
0140 #endif
0141 
0142 
0143 
0144 #if BOOST_MOVE_HAS_MSVC_ATTRIBUTE(intrinsic)
0145 #define BOOST_MOVE_INTRINSIC_CAST [[msvc::intrinsic]]
0146 #else
0147 #define BOOST_MOVE_INTRINSIC_CAST BOOST_MOVE_FORCEINLINE
0148 #endif
0149 
0150 #if defined(__has_builtin)
0151 #if __has_builtin(__builtin_launder)
0152    #define BOOST_MOVE_HAS_BUILTIN_LAUNDER
0153 #endif
0154 #endif
0155 
0156 #endif