From 39b525ca3b620aaf0f2ef0f8c93be1c23569bd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20H=C3=A9rilier?= Date: Sun, 29 Sep 2024 11:33:37 +0200 Subject: [PATCH 1/2] Silent a false-positive report from clang-format clang-format proposes to wrap a block statement with an empty one while it should not. --- src/test/json/make_events.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/json/make_events.hpp b/src/test/json/make_events.hpp index 6c733653..b2b9ecca 100644 --- a/src/test/json/make_events.hpp +++ b/src/test/json/make_events.hpp @@ -234,8 +234,10 @@ namespace tao::json::test } { // TODO: More numbers... + // clang-format off } { + // clang-format on c.string( "" ); c.element(); } From f509f081043ea96b84bf86da2b24859295cd2718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20H=C3=A9rilier?= Date: Sun, 29 Sep 2024 11:34:00 +0200 Subject: [PATCH 2/2] Fix a clang-format report --- include/tao/json/basic_value.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tao/json/basic_value.hpp b/include/tao/json/basic_value.hpp index 249831a1..875531cd 100644 --- a/include/tao/json/basic_value.hpp +++ b/include/tao/json/basic_value.hpp @@ -156,7 +156,7 @@ namespace tao::json return v; } - basic_value& operator=( basic_value v ) noexcept( std::is_nothrow_move_assignable_v< variant_t > && std::is_nothrow_move_assignable_v< public_base_t > ) + basic_value& operator=( basic_value v ) noexcept( std::is_nothrow_move_assignable_v< variant_t >&& std::is_nothrow_move_assignable_v< public_base_t > ) { m_variant = std::move( v.m_variant ); public_base_t::operator=( static_cast< public_base_t&& >( v ) );