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 <thiago.macieira@intel.com> (cherry picked from commit 80bc0152448fbd4a57a4c95147e7b3f067e6a35c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7fa3737552
commit
9dfddeb913
@ -65,17 +65,6 @@ QByteArray formatTypeWithCRef()
|
||||
|
||||
#define CHECK_SINGLE_OPERATOR(Left, Right, Op, Result) \
|
||||
do { \
|
||||
constexpr bool qtest_op_check_isImplNoexcept \
|
||||
= noexcept(std::declval<Left>() Op std::declval<Right>()); \
|
||||
if constexpr (!qtest_op_check_isImplNoexcept) { \
|
||||
QEXPECT_FAIL("", QByteArray("(" + formatTypeWithCRef<Left>() \
|
||||
+ " " #Op " " + formatTypeWithCRef<Right>() \
|
||||
+ ") 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<decltype( \
|
||||
std::declval<Left>() Op std::declval<Right>()), Result>); \
|
||||
if constexpr (!std::is_same_v<Left, Right>) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user