mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-20 14:52:24 +00:00
Add workaround for GCC-5.1.0 numeric_limits.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65883
This commit is contained in:
@@ -130,10 +130,12 @@ inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBit
|
||||
for(unsigned j = 0; j < inner_limit; ++j)
|
||||
{
|
||||
BOOST_ASSERT(i+j < result.size());
|
||||
#if (!defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || !BOOST_WORKAROUND(BOOST_GCC_VERSION <= 50100)
|
||||
BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized
|
||||
|| ((std::numeric_limits<double_limb_type>::max)() - carry
|
||||
>
|
||||
static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value) * static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)));
|
||||
#endif
|
||||
carry += static_cast<double_limb_type>(pa[i]) * static_cast<double_limb_type>(pb[j]);
|
||||
BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry >= pr[i+j]));
|
||||
carry += pr[i + j];
|
||||
|
||||
Reference in New Issue
Block a user