From 1555894dec537cbc422f43fe959b0d0ee0000881 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 25 Jul 2018 19:04:20 -0700 Subject: QCborValue: Disable support for spaceship operator __has_include() 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 --- src/corelib/serialization/qcborarray.h | 2 +- src/corelib/serialization/qcbormap.h | 2 +- src/corelib/serialization/qcborvalue.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/serialization') 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() +#if 0 && QT_HAS_INCLUDE() 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() +#if 0 && QT_HAS_INCLUDE() 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() +#if 0 && QT_HAS_INCLUDE() # include #endif @@ -252,7 +252,7 @@ public: const QCborValue operator[](qint64 key) const; int compare(const QCborValue &other) const; -#if QT_HAS_INCLUDE() +#if 0 && QT_HAS_INCLUDE() 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() +#if 0 && QT_HAS_INCLUDE() std::strong_ordering operator<=>(const QCborValue &other) const { int c = compare(other); -- cgit v1.2.3