diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 0c4df6f0a..cd4e7b61a 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -1134,15 +1134,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// types, such as nlohmann::ordered_map, fall back to the plain range /// constructor and default-construct their comparator, just as they /// always have (@ref detail::is_comparator_constructible_object_type). - template < typename Iterator, detail::enable_if_t < - detail::is_comparator_constructible_object_type::value, int > = 0 > + template::value, int> = 0> static object_t* create_object_with_comparator(const object_t& src_object, Iterator first, Iterator last) { return create(first, last, src_object.key_comp()); } - template < typename Iterator, detail::enable_if_t < - !detail::is_comparator_constructible_object_type::value, int > = 0 > + template>::value, int> = 0> static object_t* create_object_with_comparator(const object_t& /*src_object*/, Iterator first, Iterator last) { return create(first, last); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 7ad15523f..59b1f8a90 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -27246,15 +27246,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// types, such as nlohmann::ordered_map, fall back to the plain range /// constructor and default-construct their comparator, just as they /// always have (@ref detail::is_comparator_constructible_object_type). - template < typename Iterator, detail::enable_if_t < - detail::is_comparator_constructible_object_type::value, int > = 0 > + template::value, int> = 0> static object_t* create_object_with_comparator(const object_t& src_object, Iterator first, Iterator last) { return create(first, last, src_object.key_comp()); } - template < typename Iterator, detail::enable_if_t < - !detail::is_comparator_constructible_object_type::value, int > = 0 > + template>::value, int> = 0> static object_t* create_object_with_comparator(const object_t& /*src_object*/, Iterator first, Iterator last) { return create(first, last);