summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r--src/corelib/tools/qhash.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 76729917f6b..6509048da0c 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -23,7 +23,13 @@ QT_BEGIN_NAMESPACE
struct QHashDummyValue
{
- bool operator==(const QHashDummyValue &) const noexcept { return true; }
+ explicit QHashDummyValue() = default;
+ friend constexpr bool operator==(QHashDummyValue, QHashDummyValue) noexcept { return true; }
+#ifndef __cpp_impl_three_way_comparison
+ friend constexpr bool operator!=(QHashDummyValue, QHashDummyValue) noexcept { return false; }
+#endif
+ friend constexpr size_t qHash(QHashDummyValue) noexcept = delete;
+ friend constexpr size_t qHash(QHashDummyValue, size_t) noexcept = delete;
};
namespace QHashPrivate {