123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- ///////////////////////////////////////////////////////////////
- // Copyright 2012 John Maddock. Distributed under the Boost
- // Software License, Version 1.0. (See accompanying file
- // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
- //
- // Comparison operators for cpp_int_backend:
- //
- #ifndef BOOST_MP_CPP_INT_COMPARISON_HPP
- #define BOOST_MP_CPP_INT_COMPARISON_HPP
- #include <boost/multiprecision/detail/constexpr.hpp>
- namespace boost { namespace multiprecision { namespace backends {
- #ifdef BOOST_MSVC
- #pragma warning(push)
- #pragma warning(disable : 4018 4389 4996)
- #endif
- //
- // Start with non-trivial cpp_int's:
- //
- template <std::size_t MinBits, std::size_t MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& a, const cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& b) noexcept
- {
- return (a.sign() == b.sign()) && (a.size() == b.size()) && std_constexpr::equal(a.limbs(), a.limbs() + a.size(), b.limbs());
- }
- template <std::size_t MinBits1, std::size_t MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, std::size_t MinBits2, std::size_t MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& b) noexcept
- {
- return (a.sign() == b.sign()) && (a.size() == b.size()) && std_constexpr::equal(a.limbs(), a.limbs() + a.size(), b.limbs());
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, limb_type b) noexcept
- {
- return (a.sign() == false) && (a.size() == 1) && (*a.limbs() == b);
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept
- {
- return (a.sign() == (b < 0)) && (a.size() == 1) && (*a.limbs() == boost::multiprecision::detail::unsigned_abs(b));
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, limb_type b) noexcept
- {
- return (a.size() == 1) && (*a.limbs() == b);
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept
- {
- return (b < 0) ? eval_eq(a, cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>(b)) : eval_eq(a, static_cast<limb_type>(b)); // Use bit pattern of b for comparison
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, limb_type b) noexcept
- {
- if (a.sign())
- return true;
- if (a.size() > 1)
- return false;
- return *a.limbs() < b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept
- {
- if ((b == 0) || (a.sign() != (b < 0)))
- return a.sign();
- if (a.sign())
- {
- if (a.size() > 1)
- return true;
- return *a.limbs() > boost::multiprecision::detail::unsigned_abs(b);
- }
- else
- {
- if (a.size() > 1)
- return false;
- return *a.limbs() < boost::multiprecision::detail::unsigned_abs(b);
- }
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, limb_type b) noexcept
- {
- if (a.size() > 1)
- return false;
- return *a.limbs() < b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept
- {
- return (b < 0) ? a.compare(b) < 0 : eval_lt(a, static_cast<limb_type>(b)); // Use bit pattern of b for comparison
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, limb_type b) noexcept
- {
- if (a.sign())
- return false;
- if (a.size() > 1)
- return true;
- return *a.limbs() > b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- inline BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept
- {
- if (b == 0)
- return !a.sign() && ((a.size() > 1) || *a.limbs());
- if (a.sign() != (b < 0))
- return !a.sign();
- if (a.sign())
- {
- if (a.size() > 1)
- return false;
- return *a.limbs() < boost::multiprecision::detail::unsigned_abs(b);
- }
- else
- {
- if (a.size() > 1)
- return true;
- return *a.limbs() > boost::multiprecision::detail::unsigned_abs(b);
- }
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, limb_type b) noexcept
- {
- if (a.size() > 1)
- return true;
- return *a.limbs() > b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class Allocator>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- !is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator>& a, signed_limb_type b) noexcept
- {
- return (b < 0) ? a.compare(b) > 0 : eval_gt(a, static_cast<limb_type>(b)); // Use bit pattern of b for comparison.
- }
- //
- // And again for trivial cpp_ints:
- //
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::value
- eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& b) noexcept
- {
- return (a.sign() == b.sign()) && (*a.limbs() == *b.limbs());
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::value
- eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept
- {
- return *a.limbs() == *b.limbs();
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class U>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, U b) noexcept
- {
- return !a.sign() && (*a.limbs() == b);
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class S>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_signed<S>::value && boost::multiprecision::detail::is_integral<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, S b) noexcept
- {
- return (a.sign() == (b < 0)) && (*a.limbs() == boost::multiprecision::detail::unsigned_abs(b));
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class U>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, U b) noexcept
- {
- return *a.limbs() == b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class S>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_signed<S>::value && boost::multiprecision::detail::is_integral<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_eq(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, S b) noexcept
- {
- using ui_type = typename boost::multiprecision::detail::make_unsigned<S>::type;
- if (b < 0)
- {
- cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> t(b);
- return *a.limbs() == *t.limbs();
- }
- else
- {
- return *a.limbs() == static_cast<ui_type>(b);
- }
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept
- {
- if (a.sign() != b.sign())
- return a.sign();
- return a.sign() ? *a.limbs() > *b.limbs() : *a.limbs() < *b.limbs();
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept
- {
- return *a.limbs() < *b.limbs();
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class U>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, U b) noexcept
- {
- if (a.sign())
- return true;
- return *a.limbs() < b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class S>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_signed<S>::value && boost::multiprecision::detail::is_integral<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, S b) noexcept
- {
- if (a.sign() != (b < 0))
- return a.sign();
- return a.sign() ? (*a.limbs() > boost::multiprecision::detail::unsigned_abs(b)) : (*a.limbs() < boost::multiprecision::detail::unsigned_abs(b));
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class U>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, U b) noexcept
- {
- return *a.limbs() < b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class S>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_signed<S>::value && boost::multiprecision::detail::is_integral<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_lt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, S b) noexcept
- {
- using ui_type = typename boost::multiprecision::detail::make_unsigned<S>::type;
- if (b < 0)
- {
- cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> t(b);
- return *a.limbs() < *t.limbs();
- }
- else
- {
- return *a.limbs() < static_cast<ui_type>(b);
- }
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& b) noexcept
- {
- if (a.sign() != b.sign())
- return !a.sign();
- return a.sign() ? *a.limbs() < *b.limbs() : *a.limbs() > *b.limbs();
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& b) noexcept
- {
- return *a.limbs() > *b.limbs();
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class U>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, U b) noexcept
- {
- if (a.sign())
- return false;
- return *a.limbs() > b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class S>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_signed<S>::value && boost::multiprecision::detail::is_integral<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, void>& a, S b) noexcept
- {
- if (a.sign() != (b < 0))
- return !a.sign();
- return a.sign() ? (*a.limbs() < boost::multiprecision::detail::unsigned_abs(b)) : (*a.limbs() > boost::multiprecision::detail::unsigned_abs(b));
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class U>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_unsigned<U>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, U b) noexcept
- {
- return *a.limbs() > b;
- }
- template <std::size_t MinBits, std::size_t MaxBits, cpp_int_check_type Checked, class S>
- BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
- boost::multiprecision::detail::is_signed<S>::value && boost::multiprecision::detail::is_integral<S>::value && is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> >::value,
- bool>::type
- eval_gt(const cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void>& a, S b) noexcept
- {
- using ui_type = typename boost::multiprecision::detail::make_unsigned<S>::type;
- if (b < 0)
- {
- cpp_int_backend<MinBits, MaxBits, unsigned_magnitude, Checked, void> t(b);
- return *a.limbs() > *t.limbs();
- }
- else
- {
- return *a.limbs() > static_cast<ui_type>(b);
- }
- }
- #ifdef BOOST_MSVC
- #pragma warning(pop)
- #endif
- }}} // namespace boost::multiprecision::backends
- #endif
|