summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-07-25 19:04:20 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-07-29 19:09:14 +0000
commit1555894dec537cbc422f43fe959b0d0ee0000881 (patch)
treef85d631b50dc0eee45ac88d6730e2a08b9e2f5cf /src/corelib/serialization
parentbd0279c4173eb627d432d9a05411bbc725240d4e (diff)
QCborValue: Disable support for spaceship operator
__has_include(<compare>) is not the correct way to detect this feature, since that's a library header and may be provided by an implementation (libc++) before the compiler supports the syntax. Change-Id: I80aae0d068974d83b6c0fffd1544c8e558e2446b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r--src/corelib/serialization/qcborarray.h2
-rw-r--r--src/corelib/serialization/qcbormap.h2
-rw-r--r--src/corelib/serialization/qcborvalue.h6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/serialization/qcborarray.h b/src/corelib/serialization/qcborarray.h
index 98f409958a..4e9f7cf9b5 100644
--- a/src/corelib/serialization/qcborarray.h
+++ b/src/corelib/serialization/qcborarray.h
@@ -207,7 +207,7 @@ public:
bool contains(const QCborValue &value) const;
int compare(const QCborArray &other) const noexcept Q_DECL_PURE_FUNCTION;
-#if QT_HAS_INCLUDE(<compare>)
+#if 0 && QT_HAS_INCLUDE(<compare>)
std::strong_ordering operator<=>(const QCborArray &other) const
{
int c = compare(other);
diff --git a/src/corelib/serialization/qcbormap.h b/src/corelib/serialization/qcbormap.h
index 02c2ec086d..2e9422cf94 100644
--- a/src/corelib/serialization/qcbormap.h
+++ b/src/corelib/serialization/qcbormap.h
@@ -233,7 +233,7 @@ public:
{ const_iterator it = find(key); return it != end(); }
int compare(const QCborMap &other) const noexcept Q_DECL_PURE_FUNCTION;
-#if QT_HAS_INCLUDE(<compare>)
+#if 0 && QT_HAS_INCLUDE(<compare>)
std::strong_ordering operator<=>(const QCborMap &other) const
{
int c = compare(other);
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
index d44c7fbae7..f0bfa23392 100644
--- a/src/corelib/serialization/qcborvalue.h
+++ b/src/corelib/serialization/qcborvalue.h
@@ -57,7 +57,7 @@
# undef False
#endif
-#if QT_HAS_INCLUDE(<compare>)
+#if 0 && QT_HAS_INCLUDE(<compare>)
# include <compare>
#endif
@@ -252,7 +252,7 @@ public:
const QCborValue operator[](qint64 key) const;
int compare(const QCborValue &other) const;
-#if QT_HAS_INCLUDE(<compare>)
+#if 0 && QT_HAS_INCLUDE(<compare>)
std::strong_ordering operator<=>(const QCborValue &other) const
{
int c = compare(other);
@@ -398,7 +398,7 @@ public:
int compare(const QCborValue &other) const
{ return concrete().compare(other); }
-#if QT_HAS_INCLUDE(<compare>)
+#if 0 && QT_HAS_INCLUDE(<compare>)
std::strong_ordering operator<=>(const QCborValue &other) const
{
int c = compare(other);