123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef BOOST_IS_CONVERTIBLE_ARITHMETIC_HPP
- #define BOOST_IS_CONVERTIBLE_ARITHMETIC_HPP
- #include <type_traits>
- #include <boost/multiprecision/detail/number_base.hpp>
- #include <boost/multiprecision/detail/standalone_config.hpp>
- namespace boost { namespace multiprecision { namespace detail {
- template <class V, class Backend>
- struct is_convertible_arithmetic
- {
- static constexpr bool value = boost::multiprecision::detail::is_arithmetic<V>::value;
- };
- #ifdef BOOST_HAS_FLOAT128
- template <class Backend>
- struct is_convertible_arithmetic<float128_type, Backend>
- {
- static constexpr bool value = std::is_assignable<Backend, convertible_to<float128_type>>::value;
- };
- #endif
- #ifdef BOOST_HAS_INT128
- template <class Backend>
- struct is_convertible_arithmetic<int128_type, Backend>
- {
- static constexpr bool value = std::is_assignable<Backend, convertible_to<int128_type>>::value;
- };
- template <class Backend>
- struct is_convertible_arithmetic<uint128_type, Backend>
- {
- static constexpr bool value = std::is_assignable<Backend, convertible_to<uint128_type>>::value;
- };
- #endif
- }}}
- #endif
|