summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qscopeguard.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qscopeguard.h')
-rw-r--r--src/corelib/tools/qscopeguard.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qscopeguard.h b/src/corelib/tools/qscopeguard.h
index 45c3f93da4..40d2747b1d 100644
--- a/src/corelib/tools/qscopeguard.h
+++ b/src/corelib/tools/qscopeguard.h
@@ -51,7 +51,7 @@ template <typename F> QScopeGuard<F> qScopeGuard(F f);
template <typename F>
class
-#if QT_HAS_CPP_ATTRIBUTE(nodiscard)
+#if __has_cpp_attribute(nodiscard)
// Q_REQUIRED_RESULT can be defined as __warn_unused_result__ or as [[nodiscard]]
// but the 1st one has some limitations for example can be placed only on functions.
Q_REQUIRED_RESULT
@@ -91,7 +91,7 @@ private:
template <typename F>
-#if QT_HAS_CPP_ATTRIBUTE(nodiscard)
+#if __has_cpp_attribute(nodiscard)
Q_REQUIRED_RESULT
#endif
QScopeGuard<F> qScopeGuard(F f)