updated boost on windows
This commit is contained in:
@@ -7,48 +7,51 @@
|
||||
#ifndef BOOST_MP_EXPLICIT_CONVERTIBLE_HPP
|
||||
#define BOOST_MP_EXPLICIT_CONVERTIBLE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/conditional.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/declval.hpp>
|
||||
|
||||
#include <boost/type_traits/declval.hpp>
|
||||
#include <boost/multiprecision/detail/number_base.hpp> // number_category
|
||||
|
||||
namespace boost {
|
||||
namespace multiprecision {
|
||||
namespace detail {
|
||||
|
||||
template <int N>
|
||||
template <unsigned int N>
|
||||
struct dummy_size {};
|
||||
|
||||
template<typename S, typename T>
|
||||
struct has_generic_interconversion
|
||||
{
|
||||
typedef typename mpl::if_c <
|
||||
typedef typename boost::conditional <
|
||||
is_number<S>::value && is_number<T>::value,
|
||||
typename mpl::if_c <
|
||||
typename boost::conditional <
|
||||
number_category<S>::value == number_kind_integer,
|
||||
typename mpl::if_c<
|
||||
typename boost::conditional<
|
||||
number_category<T>::value == number_kind_integer
|
||||
|| number_category<T>::value == number_kind_floating_point
|
||||
|| number_category<T>::value == number_kind_rational
|
||||
|| number_category<T>::value == number_kind_fixed_point,
|
||||
mpl::true_,
|
||||
mpl::false_
|
||||
boost::true_type,
|
||||
boost::false_type
|
||||
>::type,
|
||||
typename mpl::if_c<
|
||||
typename boost::conditional<
|
||||
number_category<S>::value == number_kind_rational,
|
||||
typename mpl::if_c<
|
||||
typename boost::conditional<
|
||||
number_category<T>::value == number_kind_rational
|
||||
|| number_category<T>::value == number_kind_rational,
|
||||
mpl::true_,
|
||||
mpl::false_
|
||||
boost::true_type,
|
||||
boost::false_type
|
||||
>::type,
|
||||
typename mpl::if_c<
|
||||
typename boost::conditional<
|
||||
number_category<T>::value == number_kind_floating_point,
|
||||
mpl::true_,
|
||||
mpl::false_
|
||||
boost::true_type,
|
||||
boost::false_type
|
||||
>::type
|
||||
>::type
|
||||
> ::type,
|
||||
mpl::false_
|
||||
boost::false_type
|
||||
> ::type type;
|
||||
};
|
||||
|
||||
@@ -57,7 +60,13 @@ namespace boost {
|
||||
{
|
||||
#ifndef BOOST_NO_SFINAE_EXPR
|
||||
template<typename S1, typename T1>
|
||||
static type_traits::yes_type selector(dummy_size<sizeof(static_cast<T1>(declval<S1>()))>*);
|
||||
static type_traits::yes_type selector(dummy_size<sizeof(new T1(boost::declval<
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
S1
|
||||
#else
|
||||
S1 const&
|
||||
#endif
|
||||
>()))>*);
|
||||
|
||||
template<typename S1, typename T1>
|
||||
static type_traits::no_type selector(...);
|
||||
@@ -67,7 +76,7 @@ namespace boost {
|
||||
typedef boost::integral_constant<bool, value> type;
|
||||
#else
|
||||
typedef typename has_generic_interconversion<S, T>::type gen_type;
|
||||
typedef mpl::bool_<boost::is_convertible<S, T>::value || gen_type::value> type;
|
||||
typedef boost::integral_constant<bool, boost::is_convertible<S, T>::value || gen_type::value> type;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
|
||||
namespace boost{ namespace multiprecision{ namespace detail{
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(signed_types);
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(unsigned_types);
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(float_types);
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(signed_types)
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(unsigned_types)
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(float_types)
|
||||
|
||||
template <class T>
|
||||
struct is_backend
|
||||
|
||||
@@ -6,25 +6,28 @@
|
||||
#ifndef BOOST_IS_BYTE_CONTAINER_HPP
|
||||
#define BOOST_IS_BYTE_CONTAINER_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
|
||||
namespace boost{ namespace multiprecision{ namespace detail{
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_value_type, value_type, false);
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_const_iterator, const_iterator, false);
|
||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_member_const_iterator, const_iterator, false)
|
||||
|
||||
template <class C, bool b>
|
||||
struct is_byte_container_imp
|
||||
{
|
||||
static const bool value = boost::is_integral<typename C::value_type>::value && (sizeof(typename C::value_type) == 1);
|
||||
// Note: Don't use C::value_type as this is a rather widespread typedef, even for non-range types
|
||||
typedef typename boost::remove_cv<typename std::iterator_traits<typename C::const_iterator>::value_type>::type container_value_type;
|
||||
static const bool value = boost::is_integral<container_value_type>::value && (sizeof(container_value_type) == 1);
|
||||
};
|
||||
|
||||
template <class C>
|
||||
struct is_byte_container_imp<C, false> : public boost::false_type {};
|
||||
|
||||
template <class C>
|
||||
struct is_byte_container : public is_byte_container_imp<C, has_member_value_type<C>::value && has_member_const_iterator<C>::value> {};
|
||||
struct is_byte_container : public is_byte_container_imp<C, has_member_const_iterator<C>::value> {};
|
||||
|
||||
|
||||
}}} // namespaces
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2018 John Maddock. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MP_IS_VARIABLE_PRECISION_HPP
|
||||
#define BOOST_MP_IS_VARIABLE_PRECISION_HPP
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/multiprecision/detail/number_base.hpp>
|
||||
|
||||
namespace boost{ namespace multiprecision{ namespace detail{
|
||||
|
||||
template <class Backend>
|
||||
struct is_variable_precision : public false_type{};
|
||||
|
||||
template <class Backend, expression_template_option ExpressionTemplates>
|
||||
struct is_variable_precision<number<Backend, ExpressionTemplates> > : public is_variable_precision<Backend> {};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BOOST_MP_IS_BACKEND_HPP
|
||||
Reference in New Issue
Block a user