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