|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81422 - trunk/boost/multiprecision
From: john_at_[hidden]
Date: 2012-11-19 07:27:54
Author: johnmaddock
Date: 2012-11-19 07:27:53 EST (Mon, 19 Nov 2012)
New Revision: 81422
URL: http://svn.boost.org/trac/boost/changeset/81422
Log:
Fix misplaced use of typename.
Text files modified:
trunk/boost/multiprecision/gmp.hpp | 92 ++++++++++++++++++++--------------------
trunk/boost/multiprecision/mpfr.hpp | 2
2 files changed, 47 insertions(+), 47 deletions(-)
Modified: trunk/boost/multiprecision/gmp.hpp
==============================================================================
--- trunk/boost/multiprecision/gmp.hpp (original)
+++ trunk/boost/multiprecision/gmp.hpp 2012-11-19 07:27:53 EST (Mon, 19 Nov 2012)
@@ -24,7 +24,7 @@
#include <limits>
#include <climits>
-namespace boost{
+namespace boost{
namespace multiprecision{
namespace backends{
@@ -343,15 +343,15 @@
d = v;
return compare(d);
}
- mpf_t& data() BOOST_NOEXCEPT
- {
+ mpf_t& data() BOOST_NOEXCEPT
+ {
BOOST_ASSERT(m_data[0]._mp_d);
- return m_data;
+ return m_data;
}
- const mpf_t& data()const BOOST_NOEXCEPT
- {
+ const mpf_t& data()const BOOST_NOEXCEPT
+ {
BOOST_ASSERT(m_data[0]._mp_d);
- return m_data;
+ return m_data;
}
protected:
mpf_t m_data;
@@ -849,7 +849,7 @@
gmp_float<digits10> t(val);
if(eval_get_sign(t) < 0)
t.negate();
-
+
long digits = std::numeric_limits<long long>::digits - std::numeric_limits<long>::digits;
if(digits > 0)
@@ -882,7 +882,7 @@
inline void eval_convert_to(unsigned long long* result, const gmp_float<digits10>& val)
{
gmp_float<digits10> t(val);
-
+
long digits = std::numeric_limits<long long>::digits - std::numeric_limits<long>::digits;
if(digits > 0)
@@ -1256,15 +1256,15 @@
d = v;
return compare(d);
}
- mpz_t& data()
- {
+ mpz_t& data()
+ {
BOOST_ASSERT(m_data[0]._mp_d);
- return m_data;
+ return m_data;
}
- const mpz_t& data()const
- {
+ const mpz_t& data()const
+ {
BOOST_ASSERT(m_data[0]._mp_d);
- return m_data;
+ return m_data;
}
protected:
mpz_t m_data;
@@ -1508,7 +1508,7 @@
if(i < 0)
mpz_neg(t.data(), t.data());
}
-
+
inline void eval_bitwise_and(gmp_int& result, const gmp_int& u, const gmp_int& v)
{
mpz_and(result.data(), u.data(), v.data());
@@ -1625,7 +1625,7 @@
mpz_combit(val.data(), index);
}
-inline void eval_qr(const gmp_int& x, const gmp_int& y,
+inline void eval_qr(const gmp_int& x, const gmp_int& y,
gmp_int& q, gmp_int& r)
{
mpz_tdiv_qr(q.data(), r.data(), x.data(), y.data());
@@ -1922,15 +1922,15 @@
BOOST_ASSERT(m_data[0]._mp_num._mp_d);
return mpq_cmp_si(m_data, v, 1);
}
- mpq_t& data()
- {
+ mpq_t& data()
+ {
BOOST_ASSERT(m_data[0]._mp_num._mp_d);
- return m_data;
+ return m_data;
}
- const mpq_t& data()const
- {
+ const mpq_t& data()const
+ {
BOOST_ASSERT(m_data[0]._mp_num._mp_d);
- return m_data;
+ return m_data;
}
protected:
mpq_t m_data;
@@ -1992,7 +1992,7 @@
BOOST_THROW_EXCEPTION(std::overflow_error("Division by zero."));
mpq_div(t.data(), p.data(), o.data());
}
-
+
inline int eval_get_sign(const gmp_rational& val)
{
return mpq_sgn(val.data());
@@ -2161,9 +2161,9 @@
namespace detail{
template<>
-struct is_explicitly_convertible<typename canonical<mpf_t, gmp_int>::type, gmp_int> : public mpl::true_ {};
+struct is_explicitly_convertible<canonical<mpf_t, gmp_int>::type, gmp_int> : public mpl::true_ {};
template<>
-struct is_explicitly_convertible<typename canonical<mpq_t, gmp_int>::type, gmp_int> : public mpl::true_ {};
+struct is_explicitly_convertible<canonical<mpq_t, gmp_int>::type, gmp_int> : public mpl::true_ {};
template<unsigned Digits10>
struct is_explicitly_convertible<gmp_float<Digits10>, gmp_int> : public mpl::true_ {};
template<>
@@ -2176,11 +2176,11 @@
#endif
template<>
-struct number_category<typename detail::canonical<mpz_t, gmp_int>::type> : public mpl::int_<number_kind_integer>{};
+struct number_category<detail::canonical<mpz_t, gmp_int>::type> : public mpl::int_<number_kind_integer>{};
template<>
-struct number_category<typename detail::canonical<mpq_t, gmp_rational>::type> : public mpl::int_<number_kind_rational>{};
+struct number_category<detail::canonical<mpq_t, gmp_rational>::type> : public mpl::int_<number_kind_rational>{};
template<>
-struct number_category<typename detail::canonical<mpf_t, gmp_float<0> >::type> : public mpl::int_<number_kind_floating_point>{};
+struct number_category<detail::canonical<mpf_t, gmp_float<0> >::type> : public mpl::int_<number_kind_floating_point>{};
typedef number<gmp_float<50> > mpf_float_50;
@@ -2198,7 +2198,7 @@
//
// numeric_limits [partial] specializations for the types declared in this header:
//
-template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
+template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
class numeric_limits<boost::multiprecision::number<boost::multiprecision::gmp_float<Digits10>, ExpressionTemplates> >
{
typedef boost::multiprecision::number<boost::multiprecision::gmp_float<Digits10>, ExpressionTemplates> number_type;
@@ -2210,7 +2210,7 @@
// exponent values elsewhere.
//
BOOST_STATIC_CONSTEXPR number_type (min)() BOOST_NOEXCEPT
- {
+ {
initializer.do_nothing();
static std::pair<bool, number_type> value;
if(!value.first)
@@ -2222,7 +2222,7 @@
return value.second;
}
BOOST_STATIC_CONSTEXPR number_type (max)() BOOST_NOEXCEPT
- {
+ {
initializer.do_nothing();
static std::pair<bool, number_type> value;
if(!value.first)
@@ -2245,8 +2245,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = false;
BOOST_STATIC_CONSTEXPR int radix = 2;
- BOOST_STATIC_CONSTEXPR number_type epsilon() BOOST_NOEXCEPT
- {
+ BOOST_STATIC_CONSTEXPR number_type epsilon() BOOST_NOEXCEPT
+ {
initializer.do_nothing();
static std::pair<bool, number_type> value;
if(!value.first)
@@ -2258,8 +2258,8 @@
return value.second;
}
// What value should this be????
- BOOST_STATIC_CONSTEXPR number_type round_error() BOOST_NOEXCEPT
- {
+ BOOST_STATIC_CONSTEXPR number_type round_error() BOOST_NOEXCEPT
+ {
// returns epsilon/2
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -2306,10 +2306,10 @@
static const data_initializer initializer;
};
-template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
+template<unsigned Digits10, boost::multiprecision::expression_template_option ExpressionTemplates>
const typename numeric_limits<boost::multiprecision::number<boost::multiprecision::gmp_float<Digits10>, ExpressionTemplates> >::data_initializer numeric_limits<boost::multiprecision::number<boost::multiprecision::gmp_float<Digits10>, ExpressionTemplates> >::initializer;
-template<boost::multiprecision::expression_template_option ExpressionTemplates>
+template<boost::multiprecision::expression_template_option ExpressionTemplates>
class numeric_limits<boost::multiprecision::number<boost::multiprecision::gmp_float<0>, ExpressionTemplates> >
{
typedef boost::multiprecision::number<boost::multiprecision::gmp_float<0>, ExpressionTemplates> number_type;
@@ -2397,7 +2397,7 @@
#endif
-template<boost::multiprecision::expression_template_option ExpressionTemplates>
+template<boost::multiprecision::expression_template_option ExpressionTemplates>
class numeric_limits<boost::multiprecision::number<boost::multiprecision::gmp_int, ExpressionTemplates> >
{
typedef boost::multiprecision::number<boost::multiprecision::gmp_int, ExpressionTemplates> number_type;
@@ -2408,11 +2408,11 @@
// to zero:
//
static number_type (min)() BOOST_NOEXCEPT
- {
+ {
return number_type();
}
- static number_type (max)() BOOST_NOEXCEPT
- {
+ static number_type (max)() BOOST_NOEXCEPT
+ {
return number_type();
}
static number_type lowest() BOOST_NOEXCEPT { return (min)(); }
@@ -2495,7 +2495,7 @@
#endif
-template<boost::multiprecision::expression_template_option ExpressionTemplates>
+template<boost::multiprecision::expression_template_option ExpressionTemplates>
class numeric_limits<boost::multiprecision::number<boost::multiprecision::gmp_rational, ExpressionTemplates> >
{
typedef boost::multiprecision::number<boost::multiprecision::gmp_rational, ExpressionTemplates> number_type;
@@ -2506,11 +2506,11 @@
// to zero:
//
static number_type (min)() BOOST_NOEXCEPT
- {
+ {
return number_type();
}
- static number_type (max)() BOOST_NOEXCEPT
- {
+ static number_type (max)() BOOST_NOEXCEPT
+ {
return number_type();
}
static number_type lowest() BOOST_NOEXCEPT { return (min)(); }
Modified: trunk/boost/multiprecision/mpfr.hpp
==============================================================================
--- trunk/boost/multiprecision/mpfr.hpp (original)
+++ trunk/boost/multiprecision/mpfr.hpp 2012-11-19 07:27:53 EST (Mon, 19 Nov 2012)
@@ -1351,7 +1351,7 @@
#endif
template<>
-struct number_category<typename detail::canonical<mpfr_t, backends::mpfr_float_backend<0> >::type> : public mpl::int_<number_kind_floating_point>{};
+struct number_category<detail::canonical<mpfr_t, backends::mpfr_float_backend<0> >::type> : public mpl::int_<number_kind_floating_point>{};
using boost::multiprecision::backends::mpfr_float_backend;
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