summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtypeinfo.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-15 08:54:48 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-16 13:53:02 +0200
commit7745b49b2d7699334d0967d41535b1e162046860 (patch)
tree219b3cff6c32ffa34bc6916d64a041b9b8a54ebe /src/corelib/global/qtypeinfo.h
parentb3f3ebc2c0c9ba4142d553d02c86497377f4b3ef (diff)
QMetaType: Silence float comparison warnings in QEqualityOperatorForType
We actually do want to invoke the original equality operator there. If that is unsafe, we cannot do much about it at this point. Change-Id: Iadb2eaba1156828d89022d282c41bda57b500b13 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/global/qtypeinfo.h')
-rw-r--r--src/corelib/global/qtypeinfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index b9159a2e1a..4b29d0bf53 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -250,11 +250,14 @@ struct is_container<T, std::void_t<
// Checks the existence of the comparison operator for the class itself
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_FLOAT_COMPARE
template <typename, typename = void>
struct has_operator_equal : std::false_type {};
template <typename T>
struct has_operator_equal<T, std::void_t<decltype(bool(std::declval<const T&>() == std::declval<const T&>()))>>
: std::true_type {};
+QT_WARNING_POP
// Two forward declarations
template<typename T, bool = is_container<T>::value>