Q_DECL_EQ_DELETE_X: properly version the check for Clang

Clang 20 has fixed the referenced issue. Once more this shows the
importance of versioning compiler-related checks...
Amends 1b1ae345025d1cac953985d4cfebd20fadb6bc99.

Change-Id: Iea88d466883562b0130639d7c0f2f3b984acdbc2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit fb1824a9d669c601ebd540c9ca16a9687d7d9706)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Giuseppe D'Angelo 2025-02-25 11:39:36 +01:00 committed by Qt Cherry-pick Bot
parent 926abdce78
commit 79539c50cd

View File

@ -1016,11 +1016,11 @@
#endif
#ifndef Q_DECL_EQ_DELETE_X
// Clang advertises the feature-testing macro but issues a warning
// Clang < 20 advertises the feature-testing macro but issues a warning
// if one isn't also using C++26,
// https://github.com/llvm/llvm-project/issues/109311
# if defined(__cpp_deleted_function) && __cpp_deleted_function >= 202403L \
&& (!defined(Q_CC_CLANG_ONLY) || __cplusplus > 202302L) // C++26
&& (!defined(Q_CC_CLANG_ONLY) || Q_CC_CLANG_ONLY >= 2000 || __cplusplus > 202302L) // C++26
# define Q_DECL_EQ_DELETE_X(reason) = delete(reason)
# else
# define Q_DECL_EQ_DELETE_X(reason) = delete