Skip to content

Commit

Permalink
Fix conflicting QString operator<=> definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Aug 31, 2024
1 parent 72f055c commit 601c204
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/qt/qt_compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ template <typename P>
return a.get() <=> b.get();
}

#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
[[nodiscard]] inline std::strong_ordering operator<=>(
const QString &a,
const QString &b) noexcept {
return a.compare(b) <=> 0;
}
#endif // Qt < 6.8.0

template <typename T>
[[nodiscard]] inline std::strong_ordering operator<=>(
Expand Down

0 comments on commit 601c204

Please sign in to comment.