Skip to content

Commit 5e99ee4

Browse files
strong: add three way comparison
1 parent 1fb6f1d commit 5e99ee4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/cista/strong.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ struct strong {
116116
return *this;
117117
}
118118

119+
#if __cplusplus >= 201907L
120+
constexpr auto operator<=>(strong const&) const = default;
121+
#endif
122+
119123
constexpr bool operator==(strong const& o) const { return v_ == o.v_; }
120124
constexpr bool operator!=(strong const& o) const { return v_ != o.v_; }
121125
constexpr bool operator<=(strong const& o) const { return v_ <= o.v_; }

0 commit comments

Comments
 (0)