Keep astyle from padding the create_object_with_comparator templates

Spell the negated condition as detail::negation<...> instead of a leading
'!', which made astyle spread the template header out.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-09-30 18:17:33 +02:00
1 parent 6be8c2e986
commit 4eb8618d16
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1142,7 +1142,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
} }
template<typename Iterator, detail::enable_if_t< template<typename Iterator, detail::enable_if_t<
!detail::is_comparator_constructible_object_type<object_t, Iterator>::value, int > = 0 > detail::negation<detail::is_comparator_constructible_object_type<object_t, Iterator>>::value, int> = 0>
static object_t* create_object_with_comparator(const object_t& /*src_object*/, Iterator first, Iterator last) static object_t* create_object_with_comparator(const object_t& /*src_object*/, Iterator first, Iterator last)
{ {
return create<object_t>(first, last); return create<object_t>(first, last);
+1 -1
View File
@@ -27254,7 +27254,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
} }
template<typename Iterator, detail::enable_if_t< template<typename Iterator, detail::enable_if_t<
!detail::is_comparator_constructible_object_type<object_t, Iterator>::value, int > = 0 > detail::negation<detail::is_comparator_constructible_object_type<object_t, Iterator>>::value, int> = 0>
static object_t* create_object_with_comparator(const object_t& /*src_object*/, Iterator first, Iterator last) static object_t* create_object_with_comparator(const object_t& /*src_object*/, Iterator first, Iterator last)
{ {
return create<object_t>(first, last); return create<object_t>(first, last);