Use the compact template<...> style for the new from_json overloads

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-24 18:52:03 +02:00
1 parent cf4e0164c4
commit 8085a8f5ec
2 files changed
+4 -4

No files matched your search

@@ -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<typename BasicJsonType, typename T, std::size_t N>
std::array<T, N> from_json_make_array(const BasicJsonType& j, identity_tag<std::array<T, N>> tag,
std::false_type /*is_trivial_element*/)
{
@@ -384,7 +384,7 @@ std::array<T, N> from_json_make_array(const BasicJsonType& j, identity_tag<std::
// a trivial element type cannot tell default construction plus assignment from
// construction in place, so use a loop instead of unrolling N conversions
template < typename BasicJsonType, typename T, std::size_t N >
template<typename BasicJsonType, typename T, std::size_t N>
std::array<T, N> from_json_make_array(const BasicJsonType& j, identity_tag<std::array<T, N>> /*unused*/,
std::true_type /*is_trivial_element*/)
{