aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/spaceship.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-11-27 12:35:22 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-12-16 14:55:39 +0100
commit425f2470e47d9ddfa776434111ef0f7ae3d4ccca (patch)
tree6f017ca88dde08eb4614c8ab1609c3cf4a3da97c /sources/shiboken6/tests/libsample/spaceship.h
parent4cce05488f04b279e14e2830b39a2c243ea4c793 (diff)
shiboken6: Synthesize operator!=() from operator==() in C++ 20HEADdev
When encountering an operator==() in C++ 20 and the scope does not have an equivalent operator!=(), synthesize operator!=() using the functions added for operator<=>() [ChangeLog][shiboken6] The support for synthesizing comparison operators in C++ 20 has been reimplemented and improved. Task-number: PYSIDE-3245 Change-Id: I4f9829c9a67e1c02e5beb02b8f36f847784359a4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/libsample/spaceship.h')
-rw-r--r--sources/shiboken6/tests/libsample/spaceship.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/spaceship.h b/sources/shiboken6/tests/libsample/spaceship.h
index 1bdd1a3e5..26f636009 100644
--- a/sources/shiboken6/tests/libsample/spaceship.h
+++ b/sources/shiboken6/tests/libsample/spaceship.h
@@ -45,4 +45,18 @@ LIBSAMPLE_API std::strong_ordering operator<=>(FreeSpaceshipComparisonTester lhs
FreeSpaceshipComparisonTester rhs);
#endif // C++ 20
+
+class LIBSAMPLE_API NonEqualityComparisonTester
+{
+public:
+ explicit NonEqualityComparisonTester(int v) noexcept;
+
+ int value() const;
+
+ bool operator==(NonEqualityComparisonTester rhs) const;
+
+private:
+ int m_value;
+};
+
#endif // SPACESHIP_H