From fdb0ce2b3747243c8db8b0c575f0b4dea8387459 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 17 May 2017 18:20:48 +0100 Subject: [PATCH] Workaround for lack of numeric_limits specializations of __int128 when in strict ansi mode, rather than GNU mode. --- include/boost/multiprecision/detail/number_base.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/boost/multiprecision/detail/number_base.hpp b/include/boost/multiprecision/detail/number_base.hpp index 9b10dd82..b5d7aadd 100644 --- a/include/boost/multiprecision/detail/number_base.hpp +++ b/include/boost/multiprecision/detail/number_base.hpp @@ -988,6 +988,19 @@ template struct number_category > : public number_category{}; template struct number_category > : public number_category::result_type>{}; +// +// Specializations for types which do not always have numberic_limits specializations: +// +#ifdef BOOST_HAS_INT128 +template <> +struct number_category<__int128> : public mpl::int_ {}; +template <> +struct number_category : public mpl::int_ {}; +#endif +#ifdef BOOST_HAS_FLOAT128 +template <> +struct number_category<__float128> : public mpl::int_ {}; +#endif template struct component_type;