diff --git a/include/nlohmann/ordered_map.hpp b/include/nlohmann/ordered_map.hpp index e17b8333a..8f94b088c 100644 --- a/include/nlohmann/ordered_map.hpp +++ b/include/nlohmann/ordered_map.hpp @@ -70,8 +70,8 @@ template , return *this; } - template < class V, detail::enable_if_t < - detail::is_constructible < T, V&& >::value, int > = 0 > + template::value, int> = 0> std::pair emplace(const key_type& key, V && t) { for (auto it = this->begin(); it != this->end(); ++it) @@ -85,9 +85,9 @@ template , return {std::prev(this->end()), true}; } - template < class KeyType, class V, detail::enable_if_t < - detail::is_usable_as_key_type::value&& - detail::is_constructible < T, V&& >::value, int > = 0 > + template, + detail::is_constructible>::value, int> = 0> std::pair emplace(KeyType && key, V && t) { for (auto it = this->begin(); it != this->end(); ++it) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index a6b320e71..8b360c700 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -25832,8 +25832,8 @@ template , return *this; } - template < class V, detail::enable_if_t < - detail::is_constructible < T, V&& >::value, int > = 0 > + template::value, int> = 0> std::pair emplace(const key_type& key, V && t) { for (auto it = this->begin(); it != this->end(); ++it) @@ -25847,9 +25847,9 @@ template , return {std::prev(this->end()), true}; } - template < class KeyType, class V, detail::enable_if_t < - detail::is_usable_as_key_type::value&& - detail::is_constructible < T, V&& >::value, int > = 0 > + template, + detail::is_constructible>::value, int> = 0> std::pair emplace(KeyType && key, V && t) { for (auto it = this->begin(); it != this->end(); ++it)