summaryrefslogtreecommitdiff
path: root/boost/multiprecision/number.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/multiprecision/number.hpp')
-rw-r--r--boost/multiprecision/number.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/boost/multiprecision/number.hpp b/boost/multiprecision/number.hpp
index dc61d696f2..f99ef2a970 100644
--- a/boost/multiprecision/number.hpp
+++ b/boost/multiprecision/number.hpp
@@ -628,8 +628,12 @@ public:
return this->template convert_to<T>();
}
# else
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1900)
template <class T>
- explicit operator T()const
+#else
+ template <class T, class = typename boost::disable_if_c<boost::is_constructible<T, self_type const&>::value || !boost::is_default_constructible<T>::value, T>::type>
+#endif
+ explicit operator T ()const
{
return this->template convert_to<T>();
}