From 9dfddeb91352ba2968c099c09dad021330d49704 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Thu, 1 Aug 2024 12:56:02 +0200 Subject: [PATCH] Comparison helper macros: drop the check for noexcept Now when we explicitly have the _NON_NOEXCEPT version of the macros, and a static_assert() in the "normal" macros, it does not make sense to have these checks in the helper functions. If the developers choose the _NON_NOEXCEPT macro, they clearly know what they are doing. So simply drop the check and get rid of the annoying XFAILs in the test log. Change-Id: Id467ae5ad6a852da7c39dd1dbf32ce5838e69ecc Reviewed-by: Thiago Macieira (cherry picked from commit 80bc0152448fbd4a57a4c95147e7b3f067e6a35c) Reviewed-by: Qt Cherry-pick Bot --- src/testlib/qcomparisontesthelper_p.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/testlib/qcomparisontesthelper_p.h b/src/testlib/qcomparisontesthelper_p.h index afeb1088c46..735ea717993 100644 --- a/src/testlib/qcomparisontesthelper_p.h +++ b/src/testlib/qcomparisontesthelper_p.h @@ -65,17 +65,6 @@ QByteArray formatTypeWithCRef() #define CHECK_SINGLE_OPERATOR(Left, Right, Op, Result) \ do { \ - constexpr bool qtest_op_check_isImplNoexcept \ - = noexcept(std::declval() Op std::declval()); \ - if constexpr (!qtest_op_check_isImplNoexcept) { \ - QEXPECT_FAIL("", QByteArray("(" + formatTypeWithCRef() \ - + " " #Op " " + formatTypeWithCRef() \ - + ") is not noexcept").constData(), \ - Continue); \ - /* Ideally, operators should be noexcept, so warn if they are not. */ \ - /* Do not make it a hard error, because the fix is not always trivial. */ \ - QVERIFY(qtest_op_check_isImplNoexcept); \ - } \ static_assert(std::is_convertible_v() Op std::declval()), Result>); \ if constexpr (!std::is_same_v) { \