summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompare_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qcompare_impl.h')
-rw-r--r--src/corelib/global/qcompare_impl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/global/qcompare_impl.h b/src/corelib/global/qcompare_impl.h
index a2670a2b49..c52417fcec 100644
--- a/src/corelib/global/qcompare_impl.h
+++ b/src/corelib/global/qcompare_impl.h
@@ -1,15 +1,16 @@
// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+#ifndef QCOMPARE_IMPL_H
+#define QCOMPARE_IMPL_H
+
#if 0
#pragma qt_sync_skip_header_check
#pragma qt_sync_stop_processing
#endif
-#ifndef QCOMPARE_IMPL_H
-#define QCOMPARE_IMPL_H
-
-#include <QtCore/qglobal.h>
+#include <QtCore/qtconfigmacros.h>
+#include <QtCore/qcompilerdetection.h>
QT_BEGIN_NAMESPACE
@@ -22,7 +23,7 @@ public:
using SafeZero = void (CompareAgainstLiteralZero::*)();
Q_IMPLICIT constexpr CompareAgainstLiteralZero(SafeZero) noexcept {}
- template <typename T, std::enable_if_t<!std::is_same_v<T, int>, bool> = false>
+ template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true>
CompareAgainstLiteralZero(T) = delete;
};