1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-25 13:41:56 +03:00

remove now-useless traits. check for is_basic_json where needed

This commit is contained in:
Théo DELRIEU
2018-09-07 12:42:49 +02:00
parent 4b4bbceebf
commit aea648bb7a
4 changed files with 76 additions and 34 deletions

View File

@ -1243,7 +1243,7 @@ class basic_json
template <typename CompatibleType,
typename U = detail::uncvref_t<CompatibleType>,
detail::enable_if_t<
detail::is_compatible_type<basic_json_t, U>::value, int> = 0>
not detail::is_basic_json<U>::value and detail::is_compatible_type<basic_json_t, U>::value, int> = 0>
basic_json(CompatibleType && val) noexcept(noexcept(
JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),
std::forward<CompatibleType>(val))))