Skip to content

Commit

Permalink
Add more Choice docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Sep 23, 2023
1 parent 3d18483 commit 731087f
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 83 deletions.
16 changes: 8 additions & 8 deletions sus/choice/__private/storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ union Storage<I, ::sus::Tuple<Ts...>, Elements...> {
return more_.eq(index, other.more_);
}
}
inline constexpr std::strong_ordering ord(size_t index,
inline constexpr std::strong_ordering strong_ord(size_t index,
const Storage& other) const& {
if (index == I) {
return std::strong_order(tuple_, other.tuple_);
Expand Down Expand Up @@ -285,11 +285,11 @@ union Storage<I, Nothing, Elements...> {
return more_.eq(index, other.more_);
}
}
inline constexpr auto ord(size_t index, const Storage& other) const& {
inline constexpr auto strong_ord(size_t index, const Storage& other) const& {
if (index == I) {
return std::strong_ordering::equivalent;
} else {
return more_.ord(index, other.more_);
return more_.strong_ord(index, other.more_);
}
}
inline constexpr auto weak_ord(size_t index, const Storage& other) const& {
Expand Down Expand Up @@ -409,11 +409,11 @@ union Storage<I, ::sus::Tuple<T>, Elements...> {
return more_.eq(index, other.more_);
}
}
inline constexpr auto ord(size_t index, const Storage& other) const& {
inline constexpr auto strong_ord(size_t index, const Storage& other) const& {
if (index == I) {
return std::strong_order(tuple_, other.tuple_);
} else {
return more_.ord(index, other.more_);
return more_.strong_ord(index, other.more_);
}
}
inline constexpr auto weak_ord(size_t index, const Storage& other) const& {
Expand Down Expand Up @@ -506,7 +506,7 @@ union Storage<I, ::sus::Tuple<Ts...>> {
::sus::check(index == I);
return tuple_ == other.tuple_;
}
inline constexpr auto ord(size_t index,
inline constexpr auto strong_ord(size_t index,
const Storage& other) const& noexcept {
::sus::check(index == I);
return std::strong_order(tuple_, other.tuple_);
Expand Down Expand Up @@ -565,7 +565,7 @@ union Storage<I, Nothing> {
::sus::check(index == I);
return true;
}
inline constexpr auto ord(size_t index, const Storage&) const& {
inline constexpr auto strong_ord(size_t index, const Storage&) const& {
::sus::check(index == I);
return std::strong_ordering::equivalent;
}
Expand Down Expand Up @@ -642,7 +642,7 @@ union Storage<I, ::sus::Tuple<T>> {
::sus::check(index == I);
return tuple_ == other.tuple_;
}
inline constexpr auto ord(size_t index, const Storage& other) const& {
inline constexpr auto strong_ord(size_t index, const Storage& other) const& {
::sus::check(index == I);
return std::strong_order(tuple_, other.tuple_);
}
Expand Down
Loading

0 comments on commit 731087f

Please sign in to comment.