diff --git a/src/json.hpp b/src/json.hpp index c849f7f4..b142b3b5 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -523,8 +523,10 @@ struct has_to_json // to_json // ///////////// -template -void to_json(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept +template::type, + typename BasicJsonType::boolean_t>::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept { external_constructor::construct(j, b); } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 2e591919..34b6ec30 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -523,8 +523,10 @@ struct has_to_json // to_json // ///////////// -template -void to_json(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept +template::type, + typename BasicJsonType::boolean_t>::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept { external_constructor::construct(j, b); }