|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81809 - in trunk: boost/multiprecision boost/multiprecision/cpp_int boost/multiprecision/detail libs/multiprecision/example
From: john_at_[hidden]
Date: 2012-12-09 10:24:09
Author: johnmaddock
Date: 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
New Revision: 81809
URL: http://svn.boost.org/trac/boost/changeset/81809
Log:
Allow detail::canonical to be used with enum types.
Review all noexcept specifications - and remove quite a few that we (probably) can't guarantee.
Change example workaround for non-C++11 compilers.
Text files modified:
trunk/boost/multiprecision/cpp_int.hpp | 4
trunk/boost/multiprecision/cpp_int/limits.hpp | 18 +-
trunk/boost/multiprecision/cpp_int/misc.hpp | 4
trunk/boost/multiprecision/detail/number_base.hpp | 2
trunk/boost/multiprecision/gmp.hpp | 150 +++++++++++++++---------------
trunk/boost/multiprecision/mpfr.hpp | 194 ++++++++++++++++++++-------------------
trunk/boost/multiprecision/number.hpp | 20 ++-
trunk/boost/multiprecision/rational_adapter.hpp | 18 +-
trunk/boost/multiprecision/tommath.hpp | 18 +-
trunk/libs/multiprecision/example/floating_point_examples.cpp | 2
10 files changed, 219 insertions(+), 211 deletions(-)
Modified: trunk/boost/multiprecision/cpp_int.hpp
==============================================================================
--- trunk/boost/multiprecision/cpp_int.hpp (original)
+++ trunk/boost/multiprecision/cpp_int.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -971,7 +971,7 @@
// Direct construction from arithmetic type:
//
template <class Arg>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(Arg i, typename enable_if_c<is_allowed_cpp_int_base_conversion<Arg, base_type>::value >::type const* = 0)BOOST_NOEXCEPT_IF((Checked == unchecked))
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(Arg i, typename enable_if_c<is_allowed_cpp_int_base_conversion<Arg, base_type>::value >::type const* = 0)BOOST_NOEXCEPT_IF((Checked == unchecked) && boost::is_void<Allocator>::value)
: base_type(i) {}
private:
@@ -1169,7 +1169,7 @@
this->sign(other.sign());
}
#endif
- BOOST_MP_FORCEINLINE cpp_int_backend& operator = (const cpp_int_backend& o) BOOST_NOEXCEPT_IF(boost::is_void<Allocator>::value)
+ BOOST_MP_FORCEINLINE cpp_int_backend& operator = (const cpp_int_backend& o) BOOST_NOEXCEPT_IF((Checked == unchecked) && boost::is_void<Allocator>::value)
{
this->assign(o);
return *this;
Modified: trunk/boost/multiprecision/cpp_int/limits.hpp
==============================================================================
--- trunk/boost/multiprecision/cpp_int/limits.hpp (original)
+++ trunk/boost/multiprecision/cpp_int/limits.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -118,17 +118,17 @@
// Largest and smallest numbers are bounded only by available memory, set
// to zero:
//
- static number_type (min)() BOOST_NOEXCEPT
+ static number_type (min)()
{
init.do_nothing();
return detail::get_min<MinBits, MaxBits, SignType, Checked, Allocator, ExpressionTemplates>(boost::multiprecision::backends::is_fixed_precision<backend_type>(), boost::multiprecision::is_signed_number<backend_type>());
}
- static number_type (max)() BOOST_NOEXCEPT
+ static number_type (max)()
{
init.do_nothing();
return detail::get_max<MinBits, MaxBits, SignType, Checked, Allocator, ExpressionTemplates>(boost::multiprecision::backends::is_fixed_precision<backend_type>(), boost::multiprecision::is_signed_number<backend_type>());
}
- static number_type lowest() BOOST_NOEXCEPT { return (min)(); }
+ static number_type lowest() { return (min)(); }
BOOST_STATIC_CONSTEXPR int digits = boost::multiprecision::backends::max_precision<backend_type>::value == UINT_MAX ? INT_MAX : boost::multiprecision::backends::max_precision<backend_type>::value;
BOOST_STATIC_CONSTEXPR int digits10 = (INT_MAX / 1000) * 301L;
BOOST_STATIC_CONSTEXPR int max_digits10 = digits10 + 2;
@@ -136,8 +136,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = true;
BOOST_STATIC_CONSTEXPR bool is_exact = true;
BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon() BOOST_NOEXCEPT { return 0; }
- static number_type round_error() BOOST_NOEXCEPT { return 0; }
+ static number_type epsilon() { return 0; }
+ static number_type round_error() { return 0; }
BOOST_STATIC_CONSTEXPR int min_exponent = 0;
BOOST_STATIC_CONSTEXPR int min_exponent10 = 0;
BOOST_STATIC_CONSTEXPR int max_exponent = 0;
@@ -147,10 +147,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;
- static number_type infinity() BOOST_NOEXCEPT { return 0; }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return 0; }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return 0; }
- static number_type denorm_min() BOOST_NOEXCEPT { return 0; }
+ static number_type infinity() { return 0; }
+ static number_type quiet_NaN() { return 0; }
+ static number_type signaling_NaN() { return 0; }
+ static number_type denorm_min() { return 0; }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = boost::multiprecision::backends::is_fixed_precision<backend_type>::value;
BOOST_STATIC_CONSTEXPR bool is_modulo = (boost::multiprecision::backends::is_fixed_precision<backend_type>::value && (Checked == boost::multiprecision::unchecked));
Modified: trunk/boost/multiprecision/cpp_int/misc.hpp
==============================================================================
--- trunk/boost/multiprecision/cpp_int/misc.hpp (original)
+++ trunk/boost/multiprecision/cpp_int/misc.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -73,7 +73,7 @@
template <class R, unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
inline typename enable_if_c<is_floating_point<R>::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, void>::type
- eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& backend) BOOST_NOEXCEPT
+ eval_convert_to(R* result, const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& backend) BOOST_NOEXCEPT_IF(is_arithmetic<R>::value)
{
typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::const_limb_pointer p = backend.limbs();
unsigned shift = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
@@ -112,7 +112,7 @@
//
template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value, unsigned>::type
- eval_lsb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a) BOOST_NOEXCEPT
+ eval_lsb(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a)
{
using default_ops::eval_get_sign;
if(eval_get_sign(a) == 0)
Modified: trunk/boost/multiprecision/detail/number_base.hpp
==============================================================================
--- trunk/boost/multiprecision/detail/number_base.hpp (original)
+++ trunk/boost/multiprecision/detail/number_base.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -99,7 +99,7 @@
template <class T>
struct bits_of
{
- BOOST_STATIC_ASSERT(is_integral<T>::value || std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized);
static const unsigned value =
std::numeric_limits<T>::is_specialized ?
std::numeric_limits<T>::digits
Modified: trunk/boost/multiprecision/gmp.hpp
==============================================================================
--- trunk/boost/multiprecision/gmp.hpp (original)
+++ trunk/boost/multiprecision/gmp.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -132,21 +132,21 @@
mpf_neg(m_data, m_data);
return *this;
}
- gmp_float_imp& operator = (unsigned long i) BOOST_NOEXCEPT
+ gmp_float_imp& operator = (unsigned long i)
{
if(m_data[0]._mp_d == 0)
mpf_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
mpf_set_ui(m_data, i);
return *this;
}
- gmp_float_imp& operator = (long i) BOOST_NOEXCEPT
+ gmp_float_imp& operator = (long i)
{
if(m_data[0]._mp_d == 0)
mpf_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
mpf_set_si(m_data, i);
return *this;
}
- gmp_float_imp& operator = (double d) BOOST_NOEXCEPT
+ gmp_float_imp& operator = (double d)
{
if(m_data[0]._mp_d == 0)
mpf_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
@@ -415,21 +415,21 @@
gmp_float& operator=(const gmp_float<D>& o);
gmp_float& operator=(const gmp_int& o);
gmp_float& operator=(const gmp_rational& o);
- gmp_float& operator=(const mpf_t val) BOOST_NOEXCEPT
+ gmp_float& operator=(const mpf_t val)
{
if(this->m_data[0]._mp_d == 0)
mpf_init2(this->m_data, multiprecision::detail::digits10_2_2(digits10));
mpf_set(this->m_data, val);
return *this;
}
- gmp_float& operator=(const mpz_t val) BOOST_NOEXCEPT
+ gmp_float& operator=(const mpz_t val)
{
if(this->m_data[0]._mp_d == 0)
mpf_init2(this->m_data, multiprecision::detail::digits10_2_2(digits10));
mpf_set_z(this->m_data, val);
return *this;
}
- gmp_float& operator=(const mpq_t val) BOOST_NOEXCEPT
+ gmp_float& operator=(const mpq_t val)
{
if(this->m_data[0]._mp_d == 0)
mpf_init2(this->m_data, multiprecision::detail::digits10_2_2(digits10));
@@ -574,17 +574,17 @@
}
template <unsigned D1, unsigned D2>
-inline void eval_add(gmp_float<D1>& result, const gmp_float<D2>& o) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<D1>& result, const gmp_float<D2>& o)
{
mpf_add(result.data(), result.data(), o.data());
}
template <unsigned D1, unsigned D2>
-inline void eval_subtract(gmp_float<D1>& result, const gmp_float<D2>& o) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<D1>& result, const gmp_float<D2>& o)
{
mpf_sub(result.data(), result.data(), o.data());
}
template <unsigned D1, unsigned D2>
-inline void eval_multiply(gmp_float<D1>& result, const gmp_float<D2>& o) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<D1>& result, const gmp_float<D2>& o)
{
mpf_mul(result.data(), result.data(), o.data());
}
@@ -601,17 +601,17 @@
mpf_div(result.data(), result.data(), o.data());
}
template <unsigned digits10>
-inline void eval_add(gmp_float<digits10>& result, unsigned long i) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<digits10>& result, unsigned long i)
{
mpf_add_ui(result.data(), result.data(), i);
}
template <unsigned digits10>
-inline void eval_subtract(gmp_float<digits10>& result, unsigned long i) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<digits10>& result, unsigned long i)
{
mpf_sub_ui(result.data(), result.data(), i);
}
template <unsigned digits10>
-inline void eval_multiply(gmp_float<digits10>& result, unsigned long i) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<digits10>& result, unsigned long i)
{
mpf_mul_ui(result.data(), result.data(), i);
}
@@ -623,7 +623,7 @@
mpf_div_ui(result.data(), result.data(), i);
}
template <unsigned digits10>
-inline void eval_add(gmp_float<digits10>& result, long i) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<digits10>& result, long i)
{
if(i > 0)
mpf_add_ui(result.data(), result.data(), i);
@@ -631,7 +631,7 @@
mpf_sub_ui(result.data(), result.data(), std::abs(i));
}
template <unsigned digits10>
-inline void eval_subtract(gmp_float<digits10>& result, long i) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<digits10>& result, long i)
{
if(i > 0)
mpf_sub_ui(result.data(), result.data(), i);
@@ -639,7 +639,7 @@
mpf_add_ui(result.data(), result.data(), std::abs(i));
}
template <unsigned digits10>
-inline void eval_multiply(gmp_float<digits10>& result, long i) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<digits10>& result, long i)
{
mpf_mul_ui(result.data(), result.data(), std::abs(i));
if(i < 0)
@@ -658,17 +658,17 @@
// Specialised 3 arg versions of the basic operators:
//
template <unsigned D1, unsigned D2, unsigned D3>
-inline void eval_add(gmp_float<D1>& a, const gmp_float<D2>& x, const gmp_float<D3>& y) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<D1>& a, const gmp_float<D2>& x, const gmp_float<D3>& y)
{
mpf_add(a.data(), x.data(), y.data());
}
template <unsigned D1, unsigned D2>
-inline void eval_add(gmp_float<D1>& a, const gmp_float<D2>& x, unsigned long y) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<D1>& a, const gmp_float<D2>& x, unsigned long y)
{
mpf_add_ui(a.data(), x.data(), y);
}
template <unsigned D1, unsigned D2>
-inline void eval_add(gmp_float<D1>& a, const gmp_float<D2>& x, long y) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<D1>& a, const gmp_float<D2>& x, long y)
{
if(y < 0)
mpf_sub_ui(a.data(), x.data(), -y);
@@ -676,12 +676,12 @@
mpf_add_ui(a.data(), x.data(), y);
}
template <unsigned D1, unsigned D2>
-inline void eval_add(gmp_float<D1>& a, unsigned long x, const gmp_float<D2>& y) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<D1>& a, unsigned long x, const gmp_float<D2>& y)
{
mpf_add_ui(a.data(), y.data(), x);
}
template <unsigned D1, unsigned D2>
-inline void eval_add(gmp_float<D1>& a, long x, const gmp_float<D2>& y) BOOST_NOEXCEPT
+inline void eval_add(gmp_float<D1>& a, long x, const gmp_float<D2>& y)
{
if(x < 0)
{
@@ -692,17 +692,17 @@
mpf_add_ui(a.data(), y.data(), x);
}
template <unsigned D1, unsigned D2, unsigned D3>
-inline void eval_subtract(gmp_float<D1>& a, const gmp_float<D2>& x, const gmp_float<D3>& y) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<D1>& a, const gmp_float<D2>& x, const gmp_float<D3>& y)
{
mpf_sub(a.data(), x.data(), y.data());
}
template <unsigned D1, unsigned D2>
-inline void eval_subtract(gmp_float<D1>& a, const gmp_float<D2>& x, unsigned long y) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<D1>& a, const gmp_float<D2>& x, unsigned long y)
{
mpf_sub_ui(a.data(), x.data(), y);
}
template <unsigned D1, unsigned D2>
-inline void eval_subtract(gmp_float<D1>& a, const gmp_float<D2>& x, long y) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<D1>& a, const gmp_float<D2>& x, long y)
{
if(y < 0)
mpf_add_ui(a.data(), x.data(), -y);
@@ -710,12 +710,12 @@
mpf_sub_ui(a.data(), x.data(), y);
}
template <unsigned D1, unsigned D2>
-inline void eval_subtract(gmp_float<D1>& a, unsigned long x, const gmp_float<D2>& y) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<D1>& a, unsigned long x, const gmp_float<D2>& y)
{
mpf_ui_sub(a.data(), x, y.data());
}
template <unsigned D1, unsigned D2>
-inline void eval_subtract(gmp_float<D1>& a, long x, const gmp_float<D2>& y) BOOST_NOEXCEPT
+inline void eval_subtract(gmp_float<D1>& a, long x, const gmp_float<D2>& y)
{
if(x < 0)
{
@@ -727,17 +727,17 @@
}
template <unsigned D1, unsigned D2, unsigned D3>
-inline void eval_multiply(gmp_float<D1>& a, const gmp_float<D2>& x, const gmp_float<D3>& y) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<D1>& a, const gmp_float<D2>& x, const gmp_float<D3>& y)
{
mpf_mul(a.data(), x.data(), y.data());
}
template <unsigned D1, unsigned D2>
-inline void eval_multiply(gmp_float<D1>& a, const gmp_float<D2>& x, unsigned long y) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<D1>& a, const gmp_float<D2>& x, unsigned long y)
{
mpf_mul_ui(a.data(), x.data(), y);
}
template <unsigned D1, unsigned D2>
-inline void eval_multiply(gmp_float<D1>& a, const gmp_float<D2>& x, long y) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<D1>& a, const gmp_float<D2>& x, long y)
{
if(y < 0)
{
@@ -748,12 +748,12 @@
mpf_mul_ui(a.data(), x.data(), y);
}
template <unsigned D1, unsigned D2>
-inline void eval_multiply(gmp_float<D1>& a, unsigned long x, const gmp_float<D2>& y) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<D1>& a, unsigned long x, const gmp_float<D2>& y)
{
mpf_mul_ui(a.data(), y.data(), x);
}
template <unsigned D1, unsigned D2>
-inline void eval_multiply(gmp_float<D1>& a, long x, const gmp_float<D2>& y) BOOST_NOEXCEPT
+inline void eval_multiply(gmp_float<D1>& a, long x, const gmp_float<D2>& y)
{
if(x < 0)
{
@@ -912,39 +912,39 @@
// Native non-member operations:
//
template <unsigned Digits10>
-inline void eval_sqrt(gmp_float<Digits10>& result, const gmp_float<Digits10>& val) BOOST_NOEXCEPT
+inline void eval_sqrt(gmp_float<Digits10>& result, const gmp_float<Digits10>& val)
{
mpf_sqrt(result.data(), val.data());
}
template <unsigned Digits10>
-inline void eval_abs(gmp_float<Digits10>& result, const gmp_float<Digits10>& val) BOOST_NOEXCEPT
+inline void eval_abs(gmp_float<Digits10>& result, const gmp_float<Digits10>& val)
{
mpf_abs(result.data(), val.data());
}
template <unsigned Digits10>
-inline void eval_fabs(gmp_float<Digits10>& result, const gmp_float<Digits10>& val) BOOST_NOEXCEPT
+inline void eval_fabs(gmp_float<Digits10>& result, const gmp_float<Digits10>& val)
{
mpf_abs(result.data(), val.data());
}
template <unsigned Digits10>
-inline void eval_ceil(gmp_float<Digits10>& result, const gmp_float<Digits10>& val) BOOST_NOEXCEPT
+inline void eval_ceil(gmp_float<Digits10>& result, const gmp_float<Digits10>& val)
{
mpf_ceil(result.data(), val.data());
}
template <unsigned Digits10>
-inline void eval_floor(gmp_float<Digits10>& result, const gmp_float<Digits10>& val) BOOST_NOEXCEPT
+inline void eval_floor(gmp_float<Digits10>& result, const gmp_float<Digits10>& val)
{
mpf_floor(result.data(), val.data());
}
template <unsigned Digits10>
-inline void eval_trunc(gmp_float<Digits10>& result, const gmp_float<Digits10>& val) BOOST_NOEXCEPT
+inline void eval_trunc(gmp_float<Digits10>& result, const gmp_float<Digits10>& val)
{
mpf_trunc(result.data(), val.data());
}
template <unsigned Digits10>
-inline void eval_ldexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, long e) BOOST_NOEXCEPT
+inline void eval_ldexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, long e)
{
if(e > 0)
mpf_mul_2exp(result.data(), val.data(), e);
@@ -954,7 +954,7 @@
result = val;
}
template <unsigned Digits10>
-inline void eval_frexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, int* e) BOOST_NOEXCEPT
+inline void eval_frexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, int* e)
{
long v;
mpf_get_d_2exp(&v, val.data());
@@ -962,7 +962,7 @@
eval_ldexp(result, val, -v);
}
template <unsigned Digits10>
-inline void eval_frexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, long* e) BOOST_NOEXCEPT
+inline void eval_frexp(gmp_float<Digits10>& result, const gmp_float<Digits10>& val, long* e)
{
mpf_get_d_2exp(e, val.data());
eval_ldexp(result, val, -*e);
@@ -2208,7 +2208,7 @@
// mpf_get_str on 64-bit Linux builds. Possibly we could use larger
// exponent values elsewhere.
//
- static number_type (min)() BOOST_NOEXCEPT
+ static number_type (min)()
{
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -2220,7 +2220,7 @@
}
return value.second;
}
- static number_type (max)() BOOST_NOEXCEPT
+ static number_type (max)()
{
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -2232,7 +2232,7 @@
}
return value.second;
}
- BOOST_STATIC_CONSTEXPR number_type lowest() BOOST_NOEXCEPT
+ BOOST_STATIC_CONSTEXPR number_type lowest()
{
return -(max)();
}
@@ -2244,7 +2244,7 @@
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = false;
BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon() BOOST_NOEXCEPT
+ static number_type epsilon()
{
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -2257,7 +2257,7 @@
return value.second;
}
// What value should this be????
- static number_type round_error() BOOST_NOEXCEPT
+ static number_type round_error()
{
// returns epsilon/2
initializer.do_nothing();
@@ -2279,10 +2279,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_NOEXCEPT { return number_type(); }
- BOOST_STATIC_CONSTEXPR number_type quiet_NaN() BOOST_NOEXCEPT { return number_type(); }
- BOOST_STATIC_CONSTEXPR number_type signaling_NaN() BOOST_NOEXCEPT { return number_type(); }
- BOOST_STATIC_CONSTEXPR number_type denorm_min() BOOST_NOEXCEPT { return number_type(); }
+ BOOST_STATIC_CONSTEXPR number_type infinity() { return number_type(); }
+ BOOST_STATIC_CONSTEXPR number_type quiet_NaN() { return number_type(); }
+ BOOST_STATIC_CONSTEXPR number_type signaling_NaN() { return number_type(); }
+ BOOST_STATIC_CONSTEXPR number_type denorm_min() { return number_type(); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = true;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
@@ -2314,9 +2314,9 @@
typedef boost::multiprecision::number<boost::multiprecision::gmp_float<0>, ExpressionTemplates> number_type;
public:
BOOST_STATIC_CONSTEXPR bool is_specialized = false;
- static number_type (min)() BOOST_NOEXCEPT { return number_type(); }
- static number_type (max)() BOOST_NOEXCEPT { return number_type(); }
- static number_type lowest() BOOST_NOEXCEPT { return number_type(); }
+ static number_type (min)() { return number_type(); }
+ static number_type (max)() { return number_type(); }
+ static number_type lowest() { return number_type(); }
BOOST_STATIC_CONSTEXPR int digits = 0;
BOOST_STATIC_CONSTEXPR int digits10 = 0;
BOOST_STATIC_CONSTEXPR int max_digits10 = 0;
@@ -2324,8 +2324,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = false;
BOOST_STATIC_CONSTEXPR int radix = 0;
- static number_type epsilon() BOOST_NOEXCEPT { return number_type(); }
- static number_type round_error() BOOST_NOEXCEPT { return number_type(); }
+ static number_type epsilon() { return number_type(); }
+ static number_type round_error() { return number_type(); }
BOOST_STATIC_CONSTEXPR int min_exponent = 0;
BOOST_STATIC_CONSTEXPR int min_exponent10 = 0;
BOOST_STATIC_CONSTEXPR int max_exponent = 0;
@@ -2335,10 +2335,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;
- static number_type infinity() BOOST_NOEXCEPT { return number_type(); }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type denorm_min() BOOST_NOEXCEPT { return number_type(); }
+ static number_type infinity() { return number_type(); }
+ static number_type quiet_NaN() { return number_type(); }
+ static number_type signaling_NaN() { return number_type(); }
+ static number_type denorm_min() { return number_type(); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = false;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
@@ -2406,15 +2406,15 @@
// Largest and smallest numbers are bounded only by available memory, set
// to zero:
//
- static number_type (min)() BOOST_NOEXCEPT
+ static number_type (min)()
{
return number_type();
}
- static number_type (max)() BOOST_NOEXCEPT
+ static number_type (max)()
{
return number_type();
}
- static number_type lowest() BOOST_NOEXCEPT { return (min)(); }
+ static number_type lowest() { return (min)(); }
BOOST_STATIC_CONSTEXPR int digits = INT_MAX;
BOOST_STATIC_CONSTEXPR int digits10 = (INT_MAX / 1000) * 301L;
BOOST_STATIC_CONSTEXPR int max_digits10 = digits10 + 2;
@@ -2422,8 +2422,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = true;
BOOST_STATIC_CONSTEXPR bool is_exact = true;
BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon() BOOST_NOEXCEPT { return number_type(); }
- static number_type round_error() BOOST_NOEXCEPT { return number_type(); }
+ static number_type epsilon() { return number_type(); }
+ static number_type round_error() { return number_type(); }
BOOST_STATIC_CONSTEXPR int min_exponent = 0;
BOOST_STATIC_CONSTEXPR int min_exponent10 = 0;
BOOST_STATIC_CONSTEXPR int max_exponent = 0;
@@ -2433,10 +2433,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;
- static number_type infinity() BOOST_NOEXCEPT { return number_type(); }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type denorm_min() BOOST_NOEXCEPT { return number_type(); }
+ static number_type infinity() { return number_type(); }
+ static number_type quiet_NaN() { return number_type(); }
+ static number_type signaling_NaN() { return number_type(); }
+ static number_type denorm_min() { return number_type(); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = false;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
@@ -2504,15 +2504,15 @@
// Largest and smallest numbers are bounded only by available memory, set
// to zero:
//
- static number_type (min)() BOOST_NOEXCEPT
+ static number_type (min)()
{
return number_type();
}
- static number_type (max)() BOOST_NOEXCEPT
+ static number_type (max)()
{
return number_type();
}
- static number_type lowest() BOOST_NOEXCEPT { return (min)(); }
+ static number_type lowest() { return (min)(); }
// Digits are unbounded, use zero for now:
BOOST_STATIC_CONSTEXPR int digits = INT_MAX;
BOOST_STATIC_CONSTEXPR int digits10 = (INT_MAX / 1000) * 301L;
@@ -2521,8 +2521,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = true;
BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon() BOOST_NOEXCEPT { return number_type(); }
- static number_type round_error() BOOST_NOEXCEPT { return number_type(); }
+ static number_type epsilon() { return number_type(); }
+ static number_type round_error() { return number_type(); }
BOOST_STATIC_CONSTEXPR int min_exponent = 0;
BOOST_STATIC_CONSTEXPR int min_exponent10 = 0;
BOOST_STATIC_CONSTEXPR int max_exponent = 0;
@@ -2532,10 +2532,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;
- static number_type infinity() BOOST_NOEXCEPT { return number_type(); }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type denorm_min() BOOST_NOEXCEPT { return number_type(); }
+ static number_type infinity() { return number_type(); }
+ static number_type quiet_NaN() { return number_type(); }
+ static number_type signaling_NaN() { return number_type(); }
+ static number_type denorm_min() { return number_type(); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = false;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
Modified: trunk/boost/multiprecision/mpfr.hpp
==============================================================================
--- trunk/boost/multiprecision/mpfr.hpp (original)
+++ trunk/boost/multiprecision/mpfr.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -74,7 +74,7 @@
o.m_data[0]._mpfr_d = 0;
}
#endif
- mpfr_float_imp& operator = (const mpfr_float_imp& o) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (const mpfr_float_imp& o)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
@@ -90,14 +90,14 @@
}
#endif
#ifdef _MPFR_H_HAVE_INTMAX_T
- mpfr_float_imp& operator = (unsigned long long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (unsigned long long i)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
mpfr_set_uj(m_data, i, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (long long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (long long i)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
@@ -138,28 +138,28 @@
return *this;
}
#endif
- mpfr_float_imp& operator = (unsigned long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (unsigned long i)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
mpfr_set_ui(m_data, i, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (long i)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
mpfr_set_si(m_data, i, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (double d) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (double d)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
mpfr_set_d(m_data, d, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (long double a) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (long double a)
{
if(m_data[0]._mpfr_d == 0)
mpfr_init2(m_data, multiprecision::detail::digits10_2_2(digits10 ? digits10 : get_default_precision()));
@@ -367,18 +367,18 @@
mpfr_custom_init_set(m_data, MPFR_NAN_KIND, 0, digits2, m_buffer);
mpfr_set(m_data, o.m_data, GMP_RNDN);
}
- mpfr_float_imp& operator = (const mpfr_float_imp& o) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (const mpfr_float_imp& o)
{
mpfr_set(m_data, o.m_data, GMP_RNDN);
return *this;
}
#ifdef _MPFR_H_HAVE_INTMAX_T
- mpfr_float_imp& operator = (unsigned long long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (unsigned long long i)
{
mpfr_set_uj(m_data, i, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (long long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (long long i)
{
mpfr_set_sj(m_data, i, GMP_RNDN);
return *this;
@@ -414,22 +414,22 @@
return *this;
}
#endif
- mpfr_float_imp& operator = (unsigned long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (unsigned long i)
{
mpfr_set_ui(m_data, i, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (long i) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (long i)
{
mpfr_set_si(m_data, i, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (double d) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (double d)
{
mpfr_set_d(m_data, d, GMP_RNDN);
return *this;
}
- mpfr_float_imp& operator = (long double a) BOOST_NOEXCEPT
+ mpfr_float_imp& operator = (long double a)
{
mpfr_set_ld(m_data, a, GMP_RNDN);
return *this;
@@ -679,45 +679,45 @@
*static_cast<detail::mpfr_float_imp<digits10, AllocationType>*>(this) = v;
return *this;
}
- mpfr_float_backend& operator=(const mpfr_t val)BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpfr_t val)
{
mpfr_set(this->m_data, val, GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const mpf_t val)BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpf_t val)
{
mpfr_set_f(this->m_data, val, GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const mpz_t val)BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpz_t val)
{
mpfr_set_z(this->m_data, val, GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const mpq_t val)BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpq_t val)
{
mpfr_set_q(this->m_data, val, GMP_RNDN);
return *this;
}
// We don't change our precision here, this is a fixed precision type:
template <unsigned D, mpfr_allocation_type AT>
- mpfr_float_backend& operator=(const mpfr_float_backend<D, AT>& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpfr_float_backend<D, AT>& val)
{
mpfr_set(this->m_data, val.data(), GMP_RNDN);
return *this;
}
template <unsigned D>
- mpfr_float_backend& operator=(const gmp_float<D>& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const gmp_float<D>& val)
{
mpfr_set_f(this->m_data, val.data(), GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const gmp_int& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const gmp_int& val)
{
mpfr_set_z(this->m_data, val.data(), GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const gmp_rational& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const gmp_rational& val)
{
mpfr_set_q(this->m_data, val.data(), GMP_RNDN);
return *this;
@@ -799,48 +799,48 @@
*static_cast<detail::mpfr_float_imp<0, allocate_dynamic>*>(this) = v;
return *this;
}
- mpfr_float_backend& operator=(const mpfr_t val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpfr_t val)
{
mpfr_set_prec(this->m_data, mpfr_get_prec(val));
mpfr_set(this->m_data, val, GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const mpf_t val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpf_t val)
{
mpfr_set_prec(this->m_data, mpf_get_prec(val));
mpfr_set_f(this->m_data, val, GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const mpz_t val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpz_t val)
{
mpfr_set_z(this->m_data, val, GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const mpq_t val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpq_t val)
{
mpfr_set_q(this->m_data, val, GMP_RNDN);
return *this;
}
template <unsigned D>
- mpfr_float_backend& operator=(const mpfr_float_backend<D>& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const mpfr_float_backend<D>& val)
{
mpfr_set_prec(this->m_data, mpfr_get_prec(val.data()));
mpfr_set(this->m_data, val.data(), GMP_RNDN);
return *this;
}
template <unsigned D>
- mpfr_float_backend& operator=(const gmp_float<D>& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const gmp_float<D>& val)
{
mpfr_set_prec(this->m_data, mpf_get_prec(val.data()));
mpfr_set_f(this->m_data, val.data(), GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const gmp_int& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const gmp_int& val)
{
mpfr_set_z(this->m_data, val.data(), GMP_RNDN);
return *this;
}
- mpfr_float_backend& operator=(const gmp_rational& val) BOOST_NOEXCEPT
+ mpfr_float_backend& operator=(const gmp_rational& val)
{
mpfr_set_q(this->m_data, val.data(), GMP_RNDN);
return *this;
@@ -880,17 +880,17 @@
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_add(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o)
{
mpfr_add(result.data(), result.data(), o.data(), GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_subtract(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o)
{
mpfr_sub(result.data(), result.data(), o.data(), GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_multiply(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<D1, A1>& result, const mpfr_float_backend<D2, A2>& o)
{
mpfr_mul(result.data(), result.data(), o.data(), GMP_RNDN);
}
@@ -900,17 +900,17 @@
mpfr_div(result.data(), result.data(), o.data(), GMP_RNDN);
}
template <unsigned digits10, mpfr_allocation_type AllocationType>
-inline void eval_add(mpfr_float_backend<digits10, AllocationType>& result, unsigned long i) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<digits10, AllocationType>& result, unsigned long i)
{
mpfr_add_ui(result.data(), result.data(), i, GMP_RNDN);
}
template <unsigned digits10, mpfr_allocation_type AllocationType>
-inline void eval_subtract(mpfr_float_backend<digits10, AllocationType>& result, unsigned long i) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<digits10, AllocationType>& result, unsigned long i)
{
mpfr_sub_ui(result.data(), result.data(), i, GMP_RNDN);
}
template <unsigned digits10, mpfr_allocation_type AllocationType>
-inline void eval_multiply(mpfr_float_backend<digits10, AllocationType>& result, unsigned long i) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<digits10, AllocationType>& result, unsigned long i)
{
mpfr_mul_ui(result.data(), result.data(), i, GMP_RNDN);
}
@@ -920,7 +920,7 @@
mpfr_div_ui(result.data(), result.data(), i, GMP_RNDN);
}
template <unsigned digits10, mpfr_allocation_type AllocationType>
-inline void eval_add(mpfr_float_backend<digits10, AllocationType>& result, long i) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<digits10, AllocationType>& result, long i)
{
if(i > 0)
mpfr_add_ui(result.data(), result.data(), i, GMP_RNDN);
@@ -928,7 +928,7 @@
mpfr_sub_ui(result.data(), result.data(), std::abs(i), GMP_RNDN);
}
template <unsigned digits10, mpfr_allocation_type AllocationType>
-inline void eval_subtract(mpfr_float_backend<digits10, AllocationType>& result, long i) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<digits10, AllocationType>& result, long i)
{
if(i > 0)
mpfr_sub_ui(result.data(), result.data(), i, GMP_RNDN);
@@ -936,7 +936,7 @@
mpfr_add_ui(result.data(), result.data(), std::abs(i), GMP_RNDN);
}
template <unsigned digits10, mpfr_allocation_type AllocationType>
-inline void eval_multiply(mpfr_float_backend<digits10, AllocationType>& result, long i) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<digits10, AllocationType>& result, long i)
{
mpfr_mul_ui(result.data(), result.data(), std::abs(i), GMP_RNDN);
if(i < 0)
@@ -953,17 +953,17 @@
// Specialised 3 arg versions of the basic operators:
//
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2, unsigned D3>
-inline void eval_add(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y)
{
mpfr_add(a.data(), x.data(), y.data(), GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_add(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, unsigned long y) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, unsigned long y)
{
mpfr_add_ui(a.data(), x.data(), y, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_add(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, long y) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, long y)
{
if(y < 0)
mpfr_sub_ui(a.data(), x.data(), -y, GMP_RNDN);
@@ -971,12 +971,12 @@
mpfr_add_ui(a.data(), x.data(), y, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_add(mpfr_float_backend<D1, A1>& a, unsigned long x, const mpfr_float_backend<D2, A2>& y) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<D1, A1>& a, unsigned long x, const mpfr_float_backend<D2, A2>& y)
{
mpfr_add_ui(a.data(), y.data(), x, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_add(mpfr_float_backend<D1, A1>& a, long x, const mpfr_float_backend<D2, A2>& y) BOOST_NOEXCEPT
+inline void eval_add(mpfr_float_backend<D1, A1>& a, long x, const mpfr_float_backend<D2, A2>& y)
{
if(x < 0)
{
@@ -987,17 +987,17 @@
mpfr_add_ui(a.data(), y.data(), x, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2, unsigned D3>
-inline void eval_subtract(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y)
{
mpfr_sub(a.data(), x.data(), y.data(), GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_subtract(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, unsigned long y) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, unsigned long y)
{
mpfr_sub_ui(a.data(), x.data(), y, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_subtract(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, long y) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, long y)
{
if(y < 0)
mpfr_add_ui(a.data(), x.data(), -y, GMP_RNDN);
@@ -1005,12 +1005,12 @@
mpfr_sub_ui(a.data(), x.data(), y, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_subtract(mpfr_float_backend<D1, A1>& a, unsigned long x, const mpfr_float_backend<D2, A2>& y) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<D1, A1>& a, unsigned long x, const mpfr_float_backend<D2, A2>& y)
{
mpfr_ui_sub(a.data(), x, y.data(), GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_subtract(mpfr_float_backend<D1, A1>& a, long x, const mpfr_float_backend<D2, A2>& y) BOOST_NOEXCEPT
+inline void eval_subtract(mpfr_float_backend<D1, A1>& a, long x, const mpfr_float_backend<D2, A2>& y)
{
if(x < 0)
{
@@ -1022,17 +1022,17 @@
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2, unsigned D3>
-inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, const mpfr_float_backend<D3>& y)
{
mpfr_mul(a.data(), x.data(), y.data(), GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, unsigned long y) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, unsigned long y)
{
mpfr_mul_ui(a.data(), x.data(), y, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, long y) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<D1, A1>& a, const mpfr_float_backend<D2, A2>& x, long y)
{
if(y < 0)
{
@@ -1043,12 +1043,12 @@
mpfr_mul_ui(a.data(), x.data(), y, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_multiply(mpfr_float_backend<D1, A1>& a, unsigned long x, const mpfr_float_backend<D2, A2>& y) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<D1, A1>& a, unsigned long x, const mpfr_float_backend<D2, A2>& y)
{
mpfr_mul_ui(a.data(), y.data(), x, GMP_RNDN);
}
template <unsigned D1, unsigned D2, mpfr_allocation_type A1, mpfr_allocation_type A2>
-inline void eval_multiply(mpfr_float_backend<D1, A1>& a, long x, const mpfr_float_backend<D2, A2>& y) BOOST_NOEXCEPT
+inline void eval_multiply(mpfr_float_backend<D1, A1>& a, long x, const mpfr_float_backend<D2, A2>& y)
{
if(x < 0)
{
@@ -1161,29 +1161,29 @@
// Native non-member operations:
//
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_sqrt(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val) BOOST_NOEXCEPT
+inline void eval_sqrt(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val)
{
mpfr_sqrt(result.data(), val.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_abs(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val) BOOST_NOEXCEPT
+inline void eval_abs(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val)
{
mpfr_abs(result.data(), val.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_fabs(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val) BOOST_NOEXCEPT
+inline void eval_fabs(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val)
{
mpfr_abs(result.data(), val.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_ceil(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val) BOOST_NOEXCEPT
+inline void eval_ceil(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val)
{
mpfr_ceil(result.data(), val.data());
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_floor(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val) BOOST_NOEXCEPT
+inline void eval_floor(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val)
{
mpfr_floor(result.data(), val.data());
}
@@ -1198,7 +1198,7 @@
mpfr_trunc(result.data(), val.data());
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_ldexp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val, long e) BOOST_NOEXCEPT
+inline void eval_ldexp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val, long e)
{
if(e > 0)
mpfr_mul_2exp(result.data(), val.data(), e, GMP_RNDN);
@@ -1208,7 +1208,7 @@
result = val;
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_frexp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val, int* e) BOOST_NOEXCEPT
+inline void eval_frexp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val, int* e)
{
long v;
mpfr_get_d_2exp(&v, val.data(), GMP_RNDN);
@@ -1216,7 +1216,7 @@
eval_ldexp(result, val, -v);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_frexp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val, long* e) BOOST_NOEXCEPT
+inline void eval_frexp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& val, long* e)
{
mpfr_get_d_2exp(e, val.data(), GMP_RNDN);
return eval_ldexp(result, val, -*e);
@@ -1229,7 +1229,7 @@
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_pow(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& b, const mpfr_float_backend<Digits10, AllocateType>& e) BOOST_NOEXCEPT
+inline void eval_pow(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& b, const mpfr_float_backend<Digits10, AllocateType>& e)
{
mpfr_pow(result.data(), b.data(), e.data(), GMP_RNDN);
}
@@ -1246,13 +1246,15 @@
#endif
template <unsigned Digits10, mpfr_allocation_type AllocateType, class Integer>
-inline typename enable_if<mpl::and_<is_signed<Integer>, mpl::bool_<BOOST_MP_ENABLE_IF_WORKAROUND (sizeof(Integer) <= sizeof(long))> > >::type eval_pow(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& b, const Integer& e) BOOST_NOEXCEPT
+inline typename enable_if<mpl::and_<is_signed<Integer>, mpl::bool_<BOOST_MP_ENABLE_IF_WORKAROUND (sizeof(Integer) <= sizeof(long))> > >::type
+ eval_pow(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& b, const Integer& e)
{
mpfr_pow_si(result.data(), b.data(), e, GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType, class Integer>
-inline typename enable_if<mpl::and_<is_unsigned<Integer>, mpl::bool_<BOOST_MP_ENABLE_IF_WORKAROUND (sizeof(Integer) <= sizeof(long))> > >::type eval_pow(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& b, const Integer& e) BOOST_NOEXCEPT
+inline typename enable_if<mpl::and_<is_unsigned<Integer>, mpl::bool_<BOOST_MP_ENABLE_IF_WORKAROUND (sizeof(Integer) <= sizeof(long))> > >::type
+ eval_pow(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& b, const Integer& e)
{
mpfr_pow_ui(result.data(), b.data(), e, GMP_RNDN);
}
@@ -1260,79 +1262,79 @@
#undef BOOST_MP_ENABLE_IF_WORKAROUND
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_exp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_exp(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_exp(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_log(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_log(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_log(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_log10(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_log10(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_log10(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_sin(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_sin(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_sin(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_cos(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_cos(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_cos(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_tan(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_tan(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_tan(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_asin(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_asin(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_asin(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_acos(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_acos(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_acos(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_atan(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_atan(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_atan(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_atan2(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg1, const mpfr_float_backend<Digits10, AllocateType>& arg2) BOOST_NOEXCEPT
+inline void eval_atan2(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg1, const mpfr_float_backend<Digits10, AllocateType>& arg2)
{
mpfr_atan2(result.data(), arg1.data(), arg2.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_sinh(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_sinh(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_sinh(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_cosh(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_cosh(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_cosh(result.data(), arg.data(), GMP_RNDN);
}
template <unsigned Digits10, mpfr_allocation_type AllocateType>
-inline void eval_tanh(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg) BOOST_NOEXCEPT
+inline void eval_tanh(mpfr_float_backend<Digits10, AllocateType>& result, const mpfr_float_backend<Digits10, AllocateType>& arg)
{
mpfr_tanh(result.data(), arg.data(), GMP_RNDN);
}
@@ -1396,7 +1398,7 @@
typedef boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<Digits10, AllocateType>, ExpressionTemplates> number_type;
public:
BOOST_STATIC_CONSTEXPR bool is_specialized = true;
- static number_type (min)() BOOST_NOEXCEPT
+ static number_type (min)()
{
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -1408,7 +1410,7 @@
}
return value.second;
}
- static number_type (max)() BOOST_NOEXCEPT
+ static number_type (max)()
{
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -1420,7 +1422,7 @@
}
return value.second;
}
- BOOST_STATIC_CONSTEXPR number_type lowest() BOOST_NOEXCEPT
+ BOOST_STATIC_CONSTEXPR number_type lowest()
{
return -(max)();
}
@@ -1432,7 +1434,7 @@
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = false;
BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon() BOOST_NOEXCEPT
+ static number_type epsilon()
{
initializer.do_nothing();
static std::pair<bool, number_type> value;
@@ -1445,7 +1447,7 @@
return value.second;
}
// What value should this be????
- static number_type round_error() BOOST_NOEXCEPT
+ static number_type round_error()
{
// returns epsilon/2
initializer.do_nothing();
@@ -1467,7 +1469,7 @@
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;
- static number_type infinity() BOOST_NOEXCEPT
+ static number_type infinity()
{
// returns epsilon/2
initializer.do_nothing();
@@ -1480,7 +1482,7 @@
}
return value.second;
}
- static number_type quiet_NaN() BOOST_NOEXCEPT
+ static number_type quiet_NaN()
{
// returns epsilon/2
initializer.do_nothing();
@@ -1493,11 +1495,11 @@
}
return value.second;
}
- BOOST_STATIC_CONSTEXPR number_type signaling_NaN() BOOST_NOEXCEPT
+ BOOST_STATIC_CONSTEXPR number_type signaling_NaN()
{
return number_type(0);
}
- BOOST_STATIC_CONSTEXPR number_type denorm_min() BOOST_NOEXCEPT { return number_type(0); }
+ BOOST_STATIC_CONSTEXPR number_type denorm_min() { return number_type(0); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = true;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
@@ -1581,9 +1583,9 @@
typedef boost::multiprecision::number<boost::multiprecision::mpfr_float_backend<0>, ExpressionTemplates> number_type;
public:
BOOST_STATIC_CONSTEXPR bool is_specialized = false;
- static number_type (min)() BOOST_NOEXCEPT { return number_type(0); }
- static number_type (max)() BOOST_NOEXCEPT { return number_type(0); }
- static number_type lowest() BOOST_NOEXCEPT { return number_type(0); }
+ static number_type (min)() { return number_type(0); }
+ static number_type (max)() { return number_type(0); }
+ static number_type lowest() { return number_type(0); }
BOOST_STATIC_CONSTEXPR int digits = 0;
BOOST_STATIC_CONSTEXPR int digits10 = 0;
BOOST_STATIC_CONSTEXPR int max_digits10 = 0;
@@ -1591,8 +1593,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = false;
BOOST_STATIC_CONSTEXPR int radix = 0;
- static number_type epsilon() BOOST_NOEXCEPT { return number_type(0); }
- static number_type round_error() BOOST_NOEXCEPT { return number_type(0); }
+ static number_type epsilon() { return number_type(0); }
+ static number_type round_error() { 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;
@@ -1602,10 +1604,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;
- static number_type infinity() BOOST_NOEXCEPT { return number_type(0); }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return number_type(0); }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return number_type(0); }
- static number_type denorm_min() BOOST_NOEXCEPT { return number_type(0); }
+ static number_type infinity() { return number_type(0); }
+ static number_type quiet_NaN() { return number_type(0); }
+ static number_type signaling_NaN() { return number_type(0); }
+ static number_type denorm_min() { 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;
Modified: trunk/boost/multiprecision/number.hpp
==============================================================================
--- trunk/boost/multiprecision/number.hpp (original)
+++ trunk/boost/multiprecision/number.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -88,12 +88,13 @@
}
*/
template<expression_template_option ET>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number<Backend, ET>& val) BOOST_NOEXCEPT_IF(noexcept(Backend(static_cast<const Backend&>(std::declval<Backend>())))) : m_backend(val.backend()) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number<Backend, ET>& val)
+ BOOST_NOEXCEPT_IF(noexcept(Backend(static_cast<const Backend&>(std::declval<Backend>())))) : m_backend(val.backend()) {}
template <class Other, expression_template_option ET>
BOOST_MP_FORCEINLINE number(const number<Other, ET>& val,
typename enable_if_c<(boost::is_convertible<Other, Backend>::value && !detail::is_restricted_conversion<Other, Backend>::value)>::type* = 0)
- BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = std::declval<Other>()))
+ BOOST_NOEXCEPT_IF(noexcept(Backend(static_cast<const Other&>(std::declval<Other>()))))
: m_backend(val.backend()) {}
template <class Other, expression_template_option ET>
@@ -110,7 +111,7 @@
explicit BOOST_MP_FORCEINLINE number(const number<Other, ET>& val, typename enable_if_c<
(detail::is_explicitly_convertible<Other, Backend>::value
&& (detail::is_restricted_conversion<Other, Backend>::value || !boost::is_convertible<Other, Backend>::value))
- >::type* = 0) BOOST_NOEXCEPT_IF(noexcept(Backend(std::declval<Other>())))
+ >::type* = 0) BOOST_NOEXCEPT_IF(noexcept(Backend(static_cast<const Other&>(std::declval<Other>()))))
: m_backend(val.backend()) {}
template <class V>
@@ -141,7 +142,8 @@
return *this;
}
- BOOST_MP_FORCEINLINE number& operator=(const number& e) BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = static_cast<const Backend&>(std::declval<Backend>())))
+ BOOST_MP_FORCEINLINE number& operator=(const number& e)
+ BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = static_cast<const Backend&>(std::declval<Backend>())))
{
m_backend = e.m_backend;
return *this;
@@ -149,13 +151,15 @@
template <class V>
BOOST_MP_FORCEINLINE typename enable_if<is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator=(const V& v) BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = std::declval<typename boost::multiprecision::detail::canonical<V, Backend>::type>()))
+ operator=(const V& v)
+ BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = static_cast<typename boost::multiprecision::detail::canonical<V, Backend>::type const&>(std::declval<typename boost::multiprecision::detail::canonical<V, Backend>::type>())))
{
m_backend = canonical_value(v);
return *this;
}
template <class V>
- BOOST_MP_FORCEINLINE number<Backend, ExpressionTemplates>& assign(const V& v) BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = std::declval<typename boost::multiprecision::detail::canonical<V, Backend>::type>()))
+ BOOST_MP_FORCEINLINE number<Backend, ExpressionTemplates>& assign(const V& v)
+ BOOST_NOEXCEPT_IF(noexcept(std::declval<Backend>() = static_cast<typename boost::multiprecision::detail::canonical<V, Backend>::type const&>(std::declval<typename boost::multiprecision::detail::canonical<V, Backend>::type>())))
{
m_backend = canonical_value(v);
return *this;
@@ -185,7 +189,9 @@
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(number&& r) BOOST_NOEXCEPT : m_backend(static_cast<Backend&&>(r.m_backend)){}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(number&& r)
+ BOOST_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend>())))
+ : m_backend(static_cast<Backend&&>(r.m_backend)){}
BOOST_MP_FORCEINLINE number& operator=(number&& r) BOOST_NOEXCEPT
{
m_backend = static_cast<Backend&&>(r.m_backend);
Modified: trunk/boost/multiprecision/rational_adapter.hpp
==============================================================================
--- trunk/boost/multiprecision/rational_adapter.hpp (original)
+++ trunk/boost/multiprecision/rational_adapter.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -276,15 +276,15 @@
public:
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = true;
- BOOST_STATIC_CONSTEXPR number_type (min)() BOOST_NOEXCEPT { return (base_type::min)(); }
- BOOST_STATIC_CONSTEXPR number_type (max)() BOOST_NOEXCEPT { return (base_type::max)(); }
- BOOST_STATIC_CONSTEXPR number_type lowest() BOOST_NOEXCEPT { return -(max)(); }
- BOOST_STATIC_CONSTEXPR number_type epsilon() BOOST_NOEXCEPT { return base_type::epsilon(); }
- BOOST_STATIC_CONSTEXPR number_type round_error() BOOST_NOEXCEPT { return epsilon() / 2; }
- BOOST_STATIC_CONSTEXPR number_type infinity() BOOST_NOEXCEPT { return base_type::infinity(); }
- BOOST_STATIC_CONSTEXPR number_type quiet_NaN() BOOST_NOEXCEPT { return base_type::quiet_NaN(); }
- BOOST_STATIC_CONSTEXPR number_type signaling_NaN() BOOST_NOEXCEPT { return base_type::signaling_NaN(); }
- BOOST_STATIC_CONSTEXPR number_type denorm_min() BOOST_NOEXCEPT { return base_type::denorm_min(); }
+ BOOST_STATIC_CONSTEXPR number_type (min)() { return (base_type::min)(); }
+ BOOST_STATIC_CONSTEXPR number_type (max)() { return (base_type::max)(); }
+ BOOST_STATIC_CONSTEXPR number_type lowest() { return -(max)(); }
+ BOOST_STATIC_CONSTEXPR number_type epsilon() { return base_type::epsilon(); }
+ BOOST_STATIC_CONSTEXPR number_type round_error() { return epsilon() / 2; }
+ BOOST_STATIC_CONSTEXPR number_type infinity() { return base_type::infinity(); }
+ BOOST_STATIC_CONSTEXPR number_type quiet_NaN() { return base_type::quiet_NaN(); }
+ BOOST_STATIC_CONSTEXPR number_type signaling_NaN() { return base_type::signaling_NaN(); }
+ BOOST_STATIC_CONSTEXPR number_type denorm_min() { return base_type::denorm_min(); }
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
Modified: trunk/boost/multiprecision/tommath.hpp
==============================================================================
--- trunk/boost/multiprecision/tommath.hpp (original)
+++ trunk/boost/multiprecision/tommath.hpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -656,15 +656,15 @@
// Largest and smallest numbers are bounded only by available memory, set
// to zero:
//
- static number_type (min)() BOOST_NOEXCEPT
+ static number_type (min)()
{
return number_type();
}
- static number_type (max)() BOOST_NOEXCEPT
+ static number_type (max)()
{
return number_type();
}
- static number_type lowest() BOOST_NOEXCEPT { return (min)(); }
+ static number_type lowest() { return (min)(); }
BOOST_STATIC_CONSTEXPR int digits = INT_MAX;
BOOST_STATIC_CONSTEXPR int digits10 = (INT_MAX / 1000) * 301L;
BOOST_STATIC_CONSTEXPR int max_digits10 = digits10 + 2;
@@ -672,8 +672,8 @@
BOOST_STATIC_CONSTEXPR bool is_integer = true;
BOOST_STATIC_CONSTEXPR bool is_exact = true;
BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon() BOOST_NOEXCEPT { return number_type(); }
- static number_type round_error() BOOST_NOEXCEPT { return number_type(); }
+ static number_type epsilon() { return number_type(); }
+ static number_type round_error() { return number_type(); }
BOOST_STATIC_CONSTEXPR int min_exponent = 0;
BOOST_STATIC_CONSTEXPR int min_exponent10 = 0;
BOOST_STATIC_CONSTEXPR int max_exponent = 0;
@@ -683,10 +683,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;
- static number_type infinity() BOOST_NOEXCEPT { return number_type(); }
- static number_type quiet_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type signaling_NaN() BOOST_NOEXCEPT { return number_type(); }
- static number_type denorm_min() BOOST_NOEXCEPT { return number_type(); }
+ static number_type infinity() { return number_type(); }
+ static number_type quiet_NaN() { return number_type(); }
+ static number_type signaling_NaN() { return number_type(); }
+ static number_type denorm_min() { return number_type(); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
BOOST_STATIC_CONSTEXPR bool is_bounded = false;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
Modified: trunk/libs/multiprecision/example/floating_point_examples.cpp
==============================================================================
--- trunk/libs/multiprecision/example/floating_point_examples.cpp (original)
+++ trunk/libs/multiprecision/example/floating_point_examples.cpp 2012-12-09 10:24:07 EST (Sun, 09 Dec 2012)
@@ -9,7 +9,7 @@
#include <iostream>
#include <iomanip>
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_CXX11_LAMBDAS)
#include <array>
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