X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fboost%2Fboost%2Fnumeric%2Fconversion%2Fdetail%2Fold_numeric_cast.hpp;h=9901ed2ae34e9f7209e542e7163a821947def099;hb=c40d23deacc277e4a862db803c565ff04e6031f1;hp=47b86d2c8cae640a11fa4aa8f1b8d3a4e5b26b38;hpb=b7a3831289aa542e309d8f645e68d6945f7ca292;p=features.git diff --git a/3rdparty/boost/boost/numeric/conversion/detail/old_numeric_cast.hpp b/3rdparty/boost/boost/numeric/conversion/detail/old_numeric_cast.hpp old mode 100755 new mode 100644 index 47b86d2c8c..9901ed2ae3 --- a/3rdparty/boost/boost/numeric/conversion/detail/old_numeric_cast.hpp +++ b/3rdparty/boost/boost/numeric/conversion/detail/old_numeric_cast.hpp @@ -8,6 +8,8 @@ // See http://www.boost.org/libs/conversion for Documentation. // Revision History +// 02 Jun 14 Remove VC6 workarounds. +// 16 Jul 11 Bugfixes for VC6. // 23 JUN 05 Code extracted from /boost/cast.hpp into this new header. // Keeps this legacy version of numeric_cast<> for old compilers // wich can't compile the new version in /boost/numeric/conversion/cast.hpp @@ -53,19 +55,6 @@ # include # include -// It has been demonstrated numerous times that MSVC 6.0 fails silently at link -// time if you use a template function which has template parameters that don't -// appear in the function's argument list. -// -// TODO: Add this to config.hpp? -// FLC: This macro is repeated in boost/cast.hpp but only locally (is undefined at the bottom) -// so is OK to reproduce it here. -# if defined(BOOST_MSVC) && BOOST_MSVC < 1300 -# define BOOST_EXPLICIT_DEFAULT_TARGET , ::boost::type* = 0 -# else -# define BOOST_EXPLICIT_DEFAULT_TARGET -# endif - namespace boost { using numeric::bad_numeric_cast; @@ -214,24 +203,6 @@ namespace boost template static inline bool check(X x, Y) { return x >= 0 && static_cast(static_cast(x)) != x; } - -# if defined(BOOST_MSVC) && BOOST_MSVC < 1300 - // MSVC6 can't static_cast unsigned __int64 -> floating types -# define BOOST_UINT64_CAST(src_type) \ - static inline bool check(src_type x, unsigned __int64) \ - { \ - if (x < 0) return false; \ - unsigned __int64 y = static_cast(x); \ - bool odd = y & 0x1; \ - __int64 div2 = static_cast<__int64>(y >> 1); \ - return ((static_cast(div2) * 2.0) + odd) != x; \ - } - - BOOST_UINT64_CAST(long double); - BOOST_UINT64_CAST(double); - BOOST_UINT64_CAST(float); -# undef BOOST_UINT64_CAST -# endif }; template<> @@ -285,7 +256,7 @@ namespace boost #endif template - inline Target numeric_cast(Source arg BOOST_EXPLICIT_DEFAULT_TARGET) + inline Target numeric_cast(Source arg) { // typedefs abbreviating respective trait classes typedef detail::fixed_numeric_limits arg_traits; @@ -332,8 +303,6 @@ namespace boost return static_cast(arg); } // numeric_cast -# undef BOOST_EXPLICIT_DEFAULT_TARGET - } // namespace boost #endif // BOOST_OLD_NUMERIC_CAST_HPP