Inching closer to getting GCC to compile the tests again...

[SVN r80153]
This commit is contained in:
John Maddock
2012-08-23 11:24:33 +00:00
parent 6157674972
commit 145fa2cdd4
4 changed files with 8 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ struct has_enough_bits
template <class Val, class Backend, class Tag>
struct canonical_imp
{
typedef typename decay<Val>::type type;
typedef typename remove_cv<typename decay<const Val>::type>::type type;
};
template <class Val, class Backend>
struct canonical_imp<Val, Backend, mpl::int_<0> >

View File

@@ -1083,7 +1083,6 @@ struct is_explicitly_convertible<backends::mpfr_float_backend<D1>, backends::mpf
template<>
struct number_category<typename detail::canonical<mpfr_t, backends::mpfr_float_backend<0> >::type> : public mpl::int_<number_kind_floating_point>{};
using boost::multiprecision::backends::mpfr_float_backend;
typedef number<mpfr_float_backend<50> > mpfr_float_50;

View File

@@ -1601,7 +1601,11 @@ private:
template <class B2, bool ET>
static BOOST_FORCEINLINE BOOST_CONSTEXPR const B2& canonical_value(const number<B2, ET>& v) BOOST_NOEXCEPT { return v.backend(); }
template <class V>
static BOOST_FORCEINLINE BOOST_CONSTEXPR typename detail::canonical<V, Backend>::type canonical_value(const V& v) BOOST_NOEXCEPT { return static_cast<typename detail::canonical<V, Backend>::type>(v); }
static BOOST_FORCEINLINE BOOST_CONSTEXPR typename disable_if<is_same<typename detail::canonical<V, Backend>::type, V>, typename detail::canonical<V, Backend>::type>::type
canonical_value(const V& v) BOOST_NOEXCEPT { return static_cast<typename detail::canonical<V, Backend>::type>(v); }
template <class V>
static BOOST_FORCEINLINE BOOST_CONSTEXPR typename enable_if<is_same<typename detail::canonical<V, Backend>::type, V>, const V&>::type
canonical_value(const V& v) BOOST_NOEXCEPT { return v; }
static BOOST_FORCEINLINE typename detail::canonical<std::string, Backend>::type canonical_value(const std::string& v) BOOST_NOEXCEPT { return v.c_str(); }
static BOOST_FORCEINLINE BOOST_CONSTEXPR const Backend& function_arg_value(const self_type& v) BOOST_NOEXCEPT { return v.backend(); }

View File

@@ -41,11 +41,11 @@ struct rational_adapter
template <class U>
explicit rational_adapter(const U& u,
typename enable_if_c<
detail::is_explicitly_convertible<U, IntBackend>::value && !is_convertible<U, IntBackend>::value
boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_convertible<U, IntBackend>::value
>::type* = 0)
: m_value(IntBackend(u)){}
template <class U>
typename enable_if_c<(detail::is_explicitly_convertible<U, IntBackend>::value && !is_arithmetic<U>::value), rational_adapter&>::type operator = (const U& u)
typename enable_if_c<(boost::multiprecision::detail::is_explicitly_convertible<U, IntBackend>::value && !is_arithmetic<U>::value), rational_adapter&>::type operator = (const U& u)
{
m_value = IntBackend(u);
}