diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-13 15:29:54 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-13 15:29:54 +0200 |
| commit | e4130ea27cc3a13780e95bd0654675336fa564ec (patch) | |
| tree | 5843966a0f479949e2bdbd947b2307be59a31042 /domain/src | |
| parent | 826b7916c2dfb00116777ca42858624edf6a7f92 (diff) | |
| download | turns-e4130ea27cc3a13780e95bd0654675336fa564ec.tar.xz turns-e4130ea27cc3a13780e95bd0654675336fa564ec.zip | |
domain/participant: add three way comparison operator
Diffstat (limited to 'domain/src')
| -rw-r--r-- | domain/src/participant.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/domain/src/participant.cpp b/domain/src/participant.cpp index 8302024..d7e6b30 100644 --- a/domain/src/participant.cpp +++ b/domain/src/participant.cpp @@ -16,6 +16,11 @@ namespace turns::domain { } + auto participant::operator<=>(participant const & other) const noexcept -> std::partial_ordering + { + return order() <=> other.order(); + } + auto participant::name() const noexcept -> Glib::ustring const & { return m_name; @@ -38,4 +43,9 @@ namespace turns::domain return *this; } + auto operator<=>(Glib::RefPtr<participant> const & lhs, Glib::RefPtr<participant> const & rhs) -> std::partial_ordering + { + return *lhs <=> *rhs; + } + } // namespace turns::domain
\ No newline at end of file |
