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:
2 files changed
+8
-8
No files matched your search
@@ -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
|
/// types, such as nlohmann::ordered_map, fall back to the plain range
|
||||||
/// constructor and default-construct their comparator, just as they
|
/// constructor and default-construct their comparator, just as they
|
||||||
/// always have (@ref detail::is_comparator_constructible_object_type).
|
/// always have (@ref detail::is_comparator_constructible_object_type).
|
||||||
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::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, src_object.key_comp());
|
return create<object_t>(first, last, src_object.key_comp());
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
@@ -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
|
/// types, such as nlohmann::ordered_map, fall back to the plain range
|
||||||
/// constructor and default-construct their comparator, just as they
|
/// constructor and default-construct their comparator, just as they
|
||||||
/// always have (@ref detail::is_comparator_constructible_object_type).
|
/// always have (@ref detail::is_comparator_constructible_object_type).
|
||||||
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::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, src_object.key_comp());
|
return create<object_t>(first, last, src_object.key_comp());
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
Reference in new issue
Block a user