X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=inline;f=3rdparty%2Fboost%2Fboost%2Flexical_cast%2Fdetail%2Fconverter_numeric.hpp;h=1488fd5765e9eb29cd3dedcde8effa609ba87bc4;hb=09130d7a622;hp=f50e2ca0fb367900c961889b67544c6b8f6639fd;hpb=294969c6a2ba456c231e52d79b4637cdd50a6a95;p=lyx.git diff --git a/3rdparty/boost/boost/lexical_cast/detail/converter_numeric.hpp b/3rdparty/boost/boost/lexical_cast/detail/converter_numeric.hpp index f50e2ca0fb..1488fd5765 100644 --- a/3rdparty/boost/boost/lexical_cast/detail/converter_numeric.hpp +++ b/3rdparty/boost/boost/lexical_cast/detail/converter_numeric.hpp @@ -1,6 +1,6 @@ // Copyright Kevlin Henney, 2000-2005. // Copyright Alexander Nasonov, 2006-2010. -// Copyright Antony Polukhin, 2011-2016. +// Copyright Antony Polukhin, 2011-2019. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -24,9 +24,8 @@ #endif #include -#include -#include -#include +#include +#include #include #include #include @@ -43,8 +42,8 @@ struct detect_precision_loss { typedef Source source_type; typedef boost::numeric::Trunc Rounder; - typedef BOOST_DEDUCED_TYPENAME mpl::if_< - boost::is_arithmetic, Source, Source const& + typedef BOOST_DEDUCED_TYPENAME conditional< + boost::is_arithmetic::value, Source, Source const& >::type argument_type ; static inline source_type nearbyint(argument_type s, bool& is_ok) BOOST_NOEXCEPT { @@ -66,8 +65,8 @@ template struct fake_precision_loss: public Base { typedef Source source_type ; - typedef BOOST_DEDUCED_TYPENAME mpl::if_< - boost::is_arithmetic, Source, Source const& + typedef BOOST_DEDUCED_TYPENAME conditional< + boost::is_arithmetic::value, Source, Source const& >::type argument_type ; static inline source_type nearbyint(argument_type s, bool& /*is_ok*/) BOOST_NOEXCEPT { @@ -92,7 +91,7 @@ inline bool noexcept_numeric_convert(const Source& arg, Target& result) BOOST_NO detect_precision_loss > converter_orig_t; - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + typedef BOOST_DEDUCED_TYPENAME boost::conditional< boost::is_base_of< detect_precision_loss, converter_orig_t >::value, converter_orig_t, fake_precision_loss @@ -115,11 +114,12 @@ template struct lexical_cast_dynamic_num_ignoring_minus { static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { - typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c< + typedef BOOST_DEDUCED_TYPENAME boost::conditional< boost::is_float::value, - boost::mpl::identity, + boost::type_identity, boost::make_unsigned - >::type usource_t; + >::type usource_lazy_t; + typedef BOOST_DEDUCED_TYPENAME usource_lazy_t::type usource_t; if (arg < 0) { const bool res = noexcept_numeric_convert(0u - arg, result); @@ -153,7 +153,7 @@ template struct dynamic_num_converter_impl { static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + typedef BOOST_DEDUCED_TYPENAME boost::conditional< boost::is_unsigned::value && (boost::is_signed::value || boost::is_float::value) && !(boost::is_same::value) &&