X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fboost%2Fboost%2Ftype_traits%2Fhas_plus_assign.hpp;h=cf012e243ca510608e3faa200a1f4ea96d29d596;hb=c40d23deacc277e4a862db803c565ff04e6031f1;hp=5ef6f2328923b03d48406cc53f64d457e7b20f88;hpb=bd74a15ebdc2091ed39710a39c18c524094466a4;p=features.git diff --git a/3rdparty/boost/boost/type_traits/has_plus_assign.hpp b/3rdparty/boost/boost/type_traits/has_plus_assign.hpp index 5ef6f23289..cf012e243c 100644 --- a/3rdparty/boost/boost/type_traits/has_plus_assign.hpp +++ b/3rdparty/boost/boost/type_traits/has_plus_assign.hpp @@ -9,6 +9,95 @@ #ifndef BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED +#include +#include + +// cannot include this header without getting warnings of the kind: +// gcc: +// warning: value computed is not used +// warning: comparison between signed and unsigned integer expressions +// msvc: +// warning C4018: '<' : signed/unsigned mismatch +// warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) +// warning C4804: '<' : unsafe use of type 'bool' in operation +// warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation +// cannot find another implementation -> declared as system header to suppress these warnings. +#if defined(__GNUC__) +# pragma GCC system_header +#elif defined(BOOST_MSVC) +# pragma warning ( push ) +# pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 4133) +# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) +# pragma warning ( disable : 6334) +# endif +#endif + +#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + + namespace binary_op_detail { + + struct dont_care; + + template > + struct has_plus_assign_ret_imp : public boost::false_type {}; + + template + struct has_plus_assign_ret_imp::type>() += std::declval::type>())> > + : public boost::integral_constant::type>() += std::declval::type>()), Ret>::value> {}; + + template > + struct has_plus_assign_void_imp : public boost::false_type {}; + + template + struct has_plus_assign_void_imp::type>() += std::declval::type>())> > + : public boost::integral_constant::type>() += std::declval::type>())>::value> {}; + + template > + struct has_plus_assign_dc_imp : public boost::false_type {}; + + template + struct has_plus_assign_dc_imp::type>() += std::declval::type>())> > + : public boost::true_type {}; + + template + struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_ret_imp {}; + template + struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_void_imp {}; + template + struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_dc_imp {}; + + template + struct has_plus_assign_filter_impossible : public boost::binary_op_detail:: has_plus_assign_filter_ret {}; + template + struct has_plus_assign_filter_impossible : public boost::false_type {}; + + } + + template + struct has_plus_assign : public boost::binary_op_detail:: has_plus_assign_filter_impossible ::type>::value && boost::is_pointer::type>::value && !boost::is_same::type>::type>::value> {}; + +} + +#else + #define BOOST_TT_TRAIT_NAME has_plus_assign #define BOOST_TT_TRAIT_OP += #define BOOST_TT_FORBIDDEN_IF\ @@ -64,3 +153,9 @@ #undef BOOST_TT_FORBIDDEN_IF #endif + +#if defined(BOOST_MSVC) +# pragma warning (pop) +#endif + +#endif