mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-13 12:32:18 +00:00
Fix a few GCC C++0x warnings and errors
[SVN r77143]
This commit is contained in:
@@ -198,15 +198,15 @@ class numeric_limits<boost::multiprecision::concepts::mp_number_float_architype>
|
||||
typedef std::numeric_limits<long double> base_type;
|
||||
typedef boost::multiprecision::concepts::mp_number_float_architype number_type;
|
||||
public:
|
||||
BOOST_STATIC_CONSTEXPR number_type (min)() BOOST_MP_NOEXCEPT { return (base_type::min)(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type (max)() BOOST_MP_NOEXCEPT { return (base_type::max)(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type lowest() BOOST_MP_NOEXCEPT { return -(max)(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type epsilon() BOOST_MP_NOEXCEPT { return base_type::epsilon(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type round_error() BOOST_MP_NOEXCEPT { return epsilon() / 2; }
|
||||
BOOST_STATIC_CONSTEXPR number_type infinity() BOOST_MP_NOEXCEPT { return base_type::infinity(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type quiet_NaN() BOOST_MP_NOEXCEPT { return base_type::quiet_NaN(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type signaling_NaN() BOOST_MP_NOEXCEPT { return base_type::signaling_NaN(); }
|
||||
BOOST_STATIC_CONSTEXPR number_type denorm_min() BOOST_MP_NOEXCEPT { return base_type::denorm_min(); }
|
||||
static number_type (min)() BOOST_MP_NOEXCEPT { return (base_type::min)(); }
|
||||
static number_type (max)() BOOST_MP_NOEXCEPT { return (base_type::max)(); }
|
||||
static number_type lowest() BOOST_MP_NOEXCEPT { return -(max)(); }
|
||||
static number_type epsilon() BOOST_MP_NOEXCEPT { return base_type::epsilon(); }
|
||||
static number_type round_error() BOOST_MP_NOEXCEPT { return epsilon() / 2; }
|
||||
static number_type infinity() BOOST_MP_NOEXCEPT { return base_type::infinity(); }
|
||||
static number_type quiet_NaN() BOOST_MP_NOEXCEPT { return base_type::quiet_NaN(); }
|
||||
static number_type signaling_NaN() BOOST_MP_NOEXCEPT { return base_type::signaling_NaN(); }
|
||||
static number_type denorm_min() BOOST_MP_NOEXCEPT { return base_type::denorm_min(); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
cpp_int_backend() : m_limbs(1), m_internal(true), m_sign(false)
|
||||
cpp_int_backend() : m_limbs(1), m_sign(false), m_internal(true)
|
||||
{
|
||||
*limbs() = 0;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
data.ld = o.data.ld;
|
||||
m_data.ld = o.m_data.ld;
|
||||
o.m_limbs = 0;
|
||||
o.m_internal = true;
|
||||
}
|
||||
@@ -1703,7 +1703,7 @@ inline typename enable_if<is_integral<R>, void>::type convert_to(R* result, cons
|
||||
{
|
||||
*result += static_cast<R>(backend.limbs()[i]) << shift;
|
||||
shift += cpp_int_backend<InternalLimbs, Allocator>::limb_bits;
|
||||
if(shift > std::numeric_limits<R>::digits)
|
||||
if(shift > static_cast<unsigned>(std::numeric_limits<R>::digits))
|
||||
break;
|
||||
}
|
||||
if(backend.sign())
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef boost::int64_t signed_double_limb_type;
|
||||
static const limb_type max_block_10 = 1000000000;
|
||||
static const limb_type digits_per_block_10 = 9;
|
||||
|
||||
inline limb_type block_multiplier(int count)
|
||||
inline limb_type block_multiplier(unsigned count)
|
||||
{
|
||||
static const limb_type values[digits_per_block_10]
|
||||
= { 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000 };
|
||||
@@ -941,7 +941,7 @@ void divide_unsigned_helper(fixed_int<Bits, Signed>& result, const fixed_int<Bit
|
||||
r = x.data()[fixed_int<Bits, Signed>::limb_count - 1] % y;
|
||||
return;
|
||||
}
|
||||
else if(r_order == static_cast<int>(fixed_int<Bits, Signed>::limb_count) - 2)
|
||||
else if(r_order == static_cast<limb_type>(fixed_int<Bits, Signed>::limb_count) - 2)
|
||||
{
|
||||
double_limb_type a;
|
||||
a = (static_cast<double_limb_type>(r.data()[r_order]) << fixed_int<Bits, Signed>::limb_bits) | r.data()[r_order + 1];
|
||||
|
||||
@@ -1156,9 +1156,9 @@ class numeric_limits<boost::multiprecision::mp_number<boost::multiprecision::mpf
|
||||
typedef boost::multiprecision::mp_number<boost::multiprecision::mpfr_float_backend<0> > number_type;
|
||||
public:
|
||||
BOOST_STATIC_CONSTEXPR bool is_specialized = false;
|
||||
BOOST_STATIC_CONSTEXPR number_type (min)() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR number_type (max)() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR number_type lowest() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type (min)() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type (max)() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type lowest() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR int digits = 0;
|
||||
BOOST_STATIC_CONSTEXPR int digits10 = 0;
|
||||
BOOST_STATIC_CONSTEXPR int max_digits10 = 0;
|
||||
@@ -1166,8 +1166,8 @@ public:
|
||||
BOOST_STATIC_CONSTEXPR bool is_integer = false;
|
||||
BOOST_STATIC_CONSTEXPR bool is_exact = false;
|
||||
BOOST_STATIC_CONSTEXPR int radix = 0;
|
||||
BOOST_STATIC_CONSTEXPR number_type epsilon() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR number_type round_error() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type epsilon() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type round_error() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR int min_exponent = 0;
|
||||
BOOST_STATIC_CONSTEXPR int min_exponent10 = 0;
|
||||
BOOST_STATIC_CONSTEXPR int max_exponent = 0;
|
||||
@@ -1177,10 +1177,10 @@ public:
|
||||
BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = false;
|
||||
BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
|
||||
BOOST_STATIC_CONSTEXPR bool has_denorm_loss = false;
|
||||
BOOST_STATIC_CONSTEXPR number_type infinity() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR number_type quiet_NaN() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR number_type signaling_NaN() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR number_type denorm_min() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type infinity() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type quiet_NaN() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type signaling_NaN() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
static number_type denorm_min() BOOST_MP_NOEXCEPT { return number_type(0); }
|
||||
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
|
||||
BOOST_STATIC_CONSTEXPR bool is_bounded = false;
|
||||
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
|
||||
|
||||
Reference in New Issue
Block a user