Restrict noexcept on converting constructors.

See https://svn.boost.org/trac/boost/ticket/11826.
This commit is contained in:
jzmaddock
2015-12-01 15:58:26 +00:00
parent 6f963e2f47
commit 5af4564698
2 changed files with 27 additions and 2 deletions

View File

@@ -144,10 +144,10 @@ public:
return *this;
}
template <class T>
BOOST_CONSTEXPR float128_backend(const T& i, const typename enable_if_c<is_convertible<T, float128_type>::value>::type* = 0) BOOST_NOEXCEPT
BOOST_CONSTEXPR float128_backend(const T& i, const typename enable_if_c<is_convertible<T, float128_type>::value>::type* = 0) BOOST_NOEXCEPT_IF(noexcept(std::declval<float128_type&>() = std::declval<const T&>()))
: m_value(i) {}
template <class T>
typename enable_if_c<is_arithmetic<T>::value || is_convertible<T, float128_type>::value, float128_backend&>::type operator = (const T& i) BOOST_NOEXCEPT
typename enable_if_c<is_arithmetic<T>::value || is_convertible<T, float128_type>::value, float128_backend&>::type operator = (const T& i) BOOST_NOEXCEPT_IF(noexcept(std::declval<float128_type&>() = std::declval<const T&>()))
{
m_value = i;
return *this;