From e4130ea27cc3a13780e95bd0654675336fa564ec Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 13 Jul 2024 15:29:54 +0200 Subject: domain/participant: add three way comparison operator --- domain/include/turns/domain/participant.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'domain/include') 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 + #include #include #include @@ -12,6 +14,8 @@ namespace turns::domain { auto static create(Glib::ustring name, float order_value) -> Glib::RefPtr; + 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 const & lhs, Glib::RefPtr const & rhs) -> std::partial_ordering; + } // namespace turns::domain #endif \ No newline at end of file -- cgit v1.2.3