|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77143 - in sandbox/big_number/boost/multiprecision: . concepts
From: john_at_[hidden]
Date: 2012-02-29 13:26:35
Author: johnmaddock
Date: 2012-02-29 13:26:34 EST (Wed, 29 Feb 2012)
New Revision: 77143
URL: http://svn.boost.org/trac/boost/changeset/77143
Log:
Fix a few GCC C++0x warnings and errors
Text files modified:
sandbox/big_number/boost/multiprecision/concepts/mp_number_architypes.hpp | 18 +++++++++---------
sandbox/big_number/boost/multiprecision/cpp_int.hpp | 6 +++---
sandbox/big_number/boost/multiprecision/fixed_int.hpp | 4 ++--
sandbox/big_number/boost/multiprecision/mpfr.hpp | 18 +++++++++---------
4 files changed, 23 insertions(+), 23 deletions(-)
Modified: sandbox/big_number/boost/multiprecision/concepts/mp_number_architypes.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/concepts/mp_number_architypes.hpp (original)
+++ sandbox/big_number/boost/multiprecision/concepts/mp_number_architypes.hpp 2012-02-29 13:26:34 EST (Wed, 29 Feb 2012)
@@ -198,15 +198,15 @@
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(); }
};
}
Modified: sandbox/big_number/boost/multiprecision/cpp_int.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_int.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_int.hpp 2012-02-29 13:26:34 EST (Wed, 29 Feb 2012)
@@ -130,7 +130,7 @@
}
}
- 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 @@
}
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 @@
{
*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())
Modified: sandbox/big_number/boost/multiprecision/fixed_int.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/fixed_int.hpp (original)
+++ sandbox/big_number/boost/multiprecision/fixed_int.hpp 2012-02-29 13:26:34 EST (Wed, 29 Feb 2012)
@@ -24,7 +24,7 @@
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 @@
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];
Modified: sandbox/big_number/boost/multiprecision/mpfr.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/mpfr.hpp (original)
+++ sandbox/big_number/boost/multiprecision/mpfr.hpp 2012-02-29 13:26:34 EST (Wed, 29 Feb 2012)
@@ -1156,9 +1156,9 @@
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 @@
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 @@
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;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk