Skip to content

Commit 9ca14ab

Browse files
committed
Fixup: definition of concept ThreeWayComparableWith
1 parent 9034902 commit 9ca14ab

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/support.tex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4574,6 +4574,22 @@
45744574
\libconcept{StrictTotallyOrdered}\iref{concept.stricttotallyordered}.
45754575
\end{itemize}
45764576

4577+
\begin{codeblock}
4578+
template <typename T, typename U, typename Cat = partial_ordering>
4579+
concept ThreeWayComparableWith =
4580+
@\placeholdernc{weakly-equality-comparable-with}@<T, U> &&
4581+
(!ConvertibleTo<Cat, partial_ordering> || @\placeholdernc{partially-ordered-with}@<T, U>) &&
4582+
ThreeWayComparable<T, Cat> &&
4583+
ThreeWayComparable<U, Cat> &&
4584+
CommonReference<const remove_reference_t<T>&, const remove_reference_t<U>&> &&
4585+
ThreeWayComparable<
4586+
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>, Cat> &&
4587+
requires(const remove_reference_t<T>& t, const remove_reference_t<U>& u) {
4588+
{ t <=> u } -> @\placeholdernc{compares-as}@<Cat>;
4589+
{ u <=> t } -> @\placeholdernc{compares-as}@<Cat>;
4590+
};
4591+
\end{codeblock}
4592+
45774593
\pnum
45784594
Let \tcode{t} and \tcode{u} be lvalues
45794595
of types \tcode{const remove_reference_t<T>} and

0 commit comments

Comments
 (0)