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
No known key found for this signature in database
GPG key ID: 7D6E00D1DF01DEAF
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))))