🚑 fix for #448

This commit is contained in:
Niels Lohmann 2017-02-19 21:26:53 +01:00
parent 83f1d2c81b
commit 1f72c38861
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
2 changed files with 8 additions and 4 deletions

View file

@ -523,8 +523,10 @@ struct has_to_json
// to_json //
/////////////
template<typename BasicJsonType>
void to_json(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept
template<typename BasicJsonType, typename T, enable_if_t<
std::is_same<typename std::decay<T>::type,
typename BasicJsonType::boolean_t>::value, int> = 0>
void to_json(BasicJsonType& j, T b) noexcept
{
external_constructor<value_t::boolean>::construct(j, b);
}

View file

@ -523,8 +523,10 @@ struct has_to_json
// to_json //
/////////////
template<typename BasicJsonType>
void to_json(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept
template<typename BasicJsonType, typename T, enable_if_t<
std::is_same<typename std::decay<T>::type,
typename BasicJsonType::boolean_t>::value, int> = 0>
void to_json(BasicJsonType& j, T b) noexcept
{
external_constructor<value_t::boolean>::construct(j, b);
}