diff --git a/src/json.hpp b/src/json.hpp index 93e996f67..fd27d83fe 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -461,14 +461,6 @@ struct is_compatible_integer_type RealIntegerType, CompatibleNumberIntegerType > ::value; }; -template -struct is_compatible_float_type -{ - static constexpr auto value = - std::is_constructible::value and - std::is_floating_point::value; -}; - template struct is_basic_json_nested_type { @@ -568,12 +560,9 @@ void to_json(Json &j, const CompatibleString &s) external_constructor::construct(j, s); } -template < - typename Json, typename CompatibleNumberFloatType, - enable_if_t::value, - int> = 0> -void to_json(Json &j, CompatibleNumberFloatType val) noexcept +template ::value, int> = 0> +void to_json(Json &j, FloatType val) noexcept { external_constructor::construct(j, val); } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index e69211329..702f3fd3b 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -461,14 +461,6 @@ struct is_compatible_integer_type RealIntegerType, CompatibleNumberIntegerType > ::value; }; -template -struct is_compatible_float_type -{ - static constexpr auto value = - std::is_constructible::value and - std::is_floating_point::value; -}; - template struct is_basic_json_nested_type { @@ -568,12 +560,9 @@ void to_json(Json &j, const CompatibleString &s) external_constructor::construct(j, s); } -template < - typename Json, typename CompatibleNumberFloatType, - enable_if_t::value, - int> = 0> -void to_json(Json &j, CompatibleNumberFloatType val) noexcept +template ::value, int> = 0> +void to_json(Json &j, FloatType val) noexcept { external_constructor::construct(j, val); }