stabilize build system: depends, installer, boost/bdb fixes, cross targets groundwork

This commit is contained in:
2026-02-24 18:38:47 +00:00
parent da8c28aaeb
commit 65cb2619a7
13106 changed files with 2484322 additions and 1804 deletions
@@ -0,0 +1,90 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Vicente J. Botet Escriba 2009-2011
// Copyright 2012 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_EXPLICIT_CONVERTIBLE_HPP
#define BOOST_MP_EXPLICIT_CONVERTIBLE_HPP
#include <boost/type_traits/is_convertible.hpp>
#include <boost/utility/declval.hpp>
namespace boost {
namespace multiprecision {
namespace detail {
template <int N>
struct dummy_size {};
template<typename S, typename T>
struct has_generic_interconversion
{
typedef typename mpl::if_c <
is_number<S>::value && is_number<T>::value,
typename mpl::if_c <
number_category<S>::value == number_kind_integer,
typename mpl::if_c<
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_
>::type,
typename mpl::if_c<
number_category<S>::value == number_kind_rational,
typename mpl::if_c<
number_category<T>::value == number_kind_rational
|| number_category<T>::value == number_kind_rational,
mpl::true_,
mpl::false_
>::type,
typename mpl::if_c<
number_category<T>::value == number_kind_floating_point,
mpl::true_,
mpl::false_
>::type
>::type
> ::type,
mpl::false_
> ::type type;
};
template<typename S, typename T>
struct is_explicitly_convertible_imp
{
#ifndef BOOST_NO_SFINAE_EXPR
template<typename S1, typename T1>
static type_traits::yes_type selector(dummy_size<sizeof(static_cast<T1>(declval<S1>()))>*);
template<typename S1, typename T1>
static type_traits::no_type selector(...);
static const bool value = sizeof(selector<S, T>(0)) == sizeof(type_traits::yes_type);
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;
#endif
};
template<typename From, typename To>
struct is_explicitly_convertible : public is_explicitly_convertible_imp<From, To>::type
{
};
#ifdef BOOST_NO_SFINAE_EXPR
template<class Backend1, expression_template_option ExpressionTemplates1, class Backend2, expression_template_option ExpressionTemplates2>
struct is_explicitly_convertible<number<Backend1, ExpressionTemplates1>, number<Backend2, ExpressionTemplates2> >
: public is_explicitly_convertible<Backend1, Backend2>
{
};
#endif
}}} // namespaces
#endif
@@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////
// Copyright 2012 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_
#ifndef BOOST_MATH_EXTRACT_EXPONENT_HPP
#define BOOST_MATH_EXTRACT_EXPONENT_HPP
#include <boost/multiprecision/number.hpp>
namespace boost{
namespace multiprecision{
namespace backends{
template <class Backend, int cat>
struct extract_exponent_type
{
typedef int type;
};
template <class Backend>
struct extract_exponent_type<Backend, number_kind_floating_point>
{
typedef typename Backend::exponent_type type;
};
}}} // namespaces
#endif
@@ -0,0 +1,63 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright 2015 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_BACKEND_HPP
#define BOOST_MP_IS_BACKEND_HPP
#include <boost/mpl/has_xxx.hpp>
#include <boost/type_traits/conditional.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/multiprecision/detail/number_base.hpp>
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);
template <class T>
struct is_backend
{
static const bool value = has_signed_types<T>::value && has_unsigned_types<T>::value && has_float_types<T>::value;
};
template <class Backend>
struct other_backend
{
typedef typename boost::conditional<
boost::is_same<number<Backend>, number<Backend, et_on> >::value,
number<Backend, et_off>, number<Backend, et_on> >::type type;
};
template <class B, class V>
struct number_from_backend
{
typedef typename boost::conditional <
boost::is_convertible<V, number<B> >::value,
number<B>,
typename other_backend<B>::type > ::type type;
};
template <bool b, class T, class U>
struct is_first_backend_imp{ static const bool value = false; };
template <class T, class U>
struct is_first_backend_imp<true, T, U>{ static const bool value = is_convertible<U, number<T, et_on> >::value || is_convertible<U, number<T, et_off> >::value; };
template <class T, class U>
struct is_first_backend : is_first_backend_imp<is_backend<T>::value, T, U> {};
template <bool b, class T, class U>
struct is_second_backend_imp{ static const bool value = false; };
template <class T, class U>
struct is_second_backend_imp<true, T, U>{ static const bool value = (is_convertible<T, number<U, et_on> >::value || is_convertible<T, number<U, et_off> >::value) && !is_first_backend<T, U>::value; };
template <class T, class U>
struct is_second_backend : is_second_backend_imp<is_backend<U>::value, T, U> {};
}
}
}
#endif // BOOST_MP_IS_BACKEND_HPP
@@ -0,0 +1,33 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright 2015 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_IS_BYTE_CONTAINER_HPP
#define BOOST_IS_BYTE_CONTAINER_HPP
#include <boost/mpl/has_xxx.hpp>
#include <boost/type_traits/is_integral.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);
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);
};
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> {};
}}} // namespaces
#endif // BOOST_IS_BYTE_CONTAINER_HPP
@@ -0,0 +1,48 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Vicente J. Botet Escriba 2009-2011
// Copyright 2012 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_RESTRICTED_CONVERSION_HPP
#define BOOST_MP_RESTRICTED_CONVERSION_HPP
#include <boost/multiprecision/traits/explicit_conversion.hpp>
#include <boost/mpl/if.hpp>
#include <boost/multiprecision/detail/number_base.hpp>
namespace boost{ namespace multiprecision{ namespace detail{
template <class From, class To>
struct is_lossy_conversion
{
typedef typename mpl::if_c<
((number_category<From>::value == number_kind_floating_point) && (number_category<To>::value == number_kind_integer))
/* || ((number_category<From>::value == number_kind_floating_point) && (number_category<To>::value == number_kind_rational))*/
|| ((number_category<From>::value == number_kind_rational) && (number_category<To>::value == number_kind_integer))
|| ((number_category<From>::value == number_kind_fixed_point) && (number_category<To>::value == number_kind_integer))
|| (number_category<From>::value == number_kind_unknown)
|| (number_category<To>::value == number_kind_unknown),
mpl::true_,
mpl::false_
>::type type;
static const bool value = type::value;
};
template<typename From, typename To>
struct is_restricted_conversion
{
typedef typename mpl::if_c<
((is_explicitly_convertible<From, To>::value && !is_convertible<From, To>::value)
|| is_lossy_conversion<From, To>::value),
mpl::true_,
mpl::false_
>::type type;
static const bool value = type::value;
};
}}} // namespaces
#endif // BOOST_MP_RESTRICTED_CONVERSION_HPP