From 8085a8f5ec9124ae27ef385f4529ce13fe8297c3 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 24 Oct 2026 18:52:03 +0200 Subject: [PATCH] Use the compact template<...> style for the new from_json overloads Signed-off-by: Niels Lohmann --- include/nlohmann/detail/conversions/from_json.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp index 297906250..51f26706c 100644 --- a/include/nlohmann/detail/conversions/from_json.hpp +++ b/include/nlohmann/detail/conversions/from_json.hpp @@ -375,7 +375,7 @@ struct is_trivial_element // the element type may not be default constructible: construct every element // in place (a pack expansion that is unrolled N times) -template < typename BasicJsonType, typename T, std::size_t N > +template std::array from_json_make_array(const BasicJsonType& j, identity_tag> tag, std::false_type /*is_trivial_element*/) { @@ -384,7 +384,7 @@ std::array from_json_make_array(const BasicJsonType& j, identity_tag +template std::array from_json_make_array(const BasicJsonType& j, identity_tag> /*unused*/, std::true_type /*is_trivial_element*/) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 34d07bf53..fe9d867f8 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -6399,7 +6399,7 @@ struct is_trivial_element // the element type may not be default constructible: construct every element // in place (a pack expansion that is unrolled N times) -template < typename BasicJsonType, typename T, std::size_t N > +template std::array from_json_make_array(const BasicJsonType& j, identity_tag> tag, std::false_type /*is_trivial_element*/) { @@ -6408,7 +6408,7 @@ std::array from_json_make_array(const BasicJsonType& j, identity_tag +template std::array from_json_make_array(const BasicJsonType& j, identity_tag> /*unused*/, std::true_type /*is_trivial_element*/) {