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>
This commit is contained in:
parent
bd0279c417
commit
1555894dec
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user