summaryrefslogtreecommitdiff
path: root/domain/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-13 15:29:54 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-13 15:29:54 +0200
commite4130ea27cc3a13780e95bd0654675336fa564ec (patch)
tree5843966a0f479949e2bdbd947b2307be59a31042 /domain/include
parent826b7916c2dfb00116777ca42858624edf6a7f92 (diff)
downloadturns-e4130ea27cc3a13780e95bd0654675336fa564ec.tar.xz
turns-e4130ea27cc3a13780e95bd0654675336fa564ec.zip
domain/participant: add three way comparison operator
Diffstat (limited to 'domain/include')
-rw-r--r--domain/include/turns/domain/participant.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/domain/include/turns/domain/participant.hpp b/domain/include/turns/domain/participant.hpp
index 760ba31..f6ceff7 100644
--- a/domain/include/turns/domain/participant.hpp
+++ b/domain/include/turns/domain/participant.hpp
@@ -1,6 +1,8 @@
#ifndef TURNS_DOMAIN_PARTICIPANT_HPP
#define TURNS_DOMAIN_PARTICIPANT_HPP
+#include <compare>
+
#include <glibmm/object.h>
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
@@ -12,6 +14,8 @@ namespace turns::domain
{
auto static create(Glib::ustring name, float order_value) -> Glib::RefPtr<participant>;
+ auto operator<=>(participant const & other) const noexcept -> std::partial_ordering;
+
auto name() const noexcept -> Glib::ustring const &;
auto name(Glib::ustring value) -> participant &;
@@ -25,6 +29,8 @@ namespace turns::domain
float m_order_value;
};
+ auto operator<=>(Glib::RefPtr<participant> const & lhs, Glib::RefPtr<participant> const & rhs) -> std::partial_ordering;
+
} // namespace turns::domain
#endif \ No newline at end of file