:ambulance: fixed #1319
diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp
index 801df34..d901f1e 100644
--- a/include/nlohmann/detail/meta/type_traits.hpp
+++ b/include/nlohmann/detail/meta/type_traits.hpp
@@ -191,15 +191,10 @@
using object_t = typename BasicJsonType::object_t;
static constexpr bool value =
- std::is_constructible<typename ConstructibleObjectType::key_type,
- typename object_t::key_type>::value and
- (std::is_same<typename object_t::mapped_type,
- typename ConstructibleObjectType::mapped_type>::value or
- (has_from_json<BasicJsonType,
- typename ConstructibleObjectType::mapped_type>::value or
- has_non_default_from_json <
- BasicJsonType,
- typename ConstructibleObjectType::mapped_type >::value));
+ (std::is_constructible<typename ConstructibleObjectType::key_type, typename object_t::key_type>::value and
+ std::is_same<typename object_t::mapped_type, typename ConstructibleObjectType::mapped_type>::value) or
+ (has_from_json<BasicJsonType, typename ConstructibleObjectType::mapped_type>::value or
+ has_non_default_from_json<BasicJsonType, typename ConstructibleObjectType::mapped_type >::value);
};
template <typename BasicJsonType, typename ConstructibleObjectType>
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index 6b3d19f..87e8eae 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -582,15 +582,10 @@
using object_t = typename BasicJsonType::object_t;
static constexpr bool value =
- std::is_constructible<typename ConstructibleObjectType::key_type,
- typename object_t::key_type>::value and
- (std::is_same<typename object_t::mapped_type,
- typename ConstructibleObjectType::mapped_type>::value or
- (has_from_json<BasicJsonType,
- typename ConstructibleObjectType::mapped_type>::value or
- has_non_default_from_json <
- BasicJsonType,
- typename ConstructibleObjectType::mapped_type >::value));
+ (std::is_constructible<typename ConstructibleObjectType::key_type, typename object_t::key_type>::value and
+ std::is_same<typename object_t::mapped_type, typename ConstructibleObjectType::mapped_type>::value) or
+ (has_from_json<BasicJsonType, typename ConstructibleObjectType::mapped_type>::value or
+ has_non_default_from_json<BasicJsonType, typename ConstructibleObjectType::mapped_type >::value);
};
template <typename BasicJsonType, typename ConstructibleObjectType>