Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6509,16 +6509,16 @@
is usable\iref{class.compare.default}.

\pnum
The return value \tcode{V} of a defaulted \tcode{==} operator function
The return value of a defaulted \tcode{==} operator function
with parameters \tcode{x} and \tcode{y} is determined
by comparing corresponding elements $\tcode{x}_i$ and $\tcode{y}_i$
in the expanded lists of subobjects for \tcode{x} and \tcode{y}
(in increasing index order)
until the first index $i$
where $\tcode{x}_i\tcode{ == }\tcode{y}_i$ yields a result value which,
when contextually converted to \tcode{bool}, yields \tcode{false}.
If no such index exists, \tcode{V} is \tcode{true}.
Otherwise, \tcode{V} is \tcode{false}.
The return value is \tcode{true} if such an index exists
and \tcode{false} otherwise.

\pnum
\begin{example}
Expand Down Expand Up @@ -6616,7 +6616,7 @@
\end{itemize}

\pnum
The return value \tcode{V} of type \tcode{R}
The return value of type \tcode{R}
of the defaulted three-way comparison operator function
with parameters \tcode{x} and \tcode{y} of the same type
is determined by comparing corresponding elements
Expand All @@ -6627,10 +6627,10 @@
the synthesized three-way comparison of type \tcode{R}
between $\tcode{x}_i$ and $\tcode{y}_i$
yields a result value $\tcode{v}_i$ where $\tcode{v}_i \mathrel{\tcode{!=}} 0$,
contextually converted to \tcode{bool}, yields \tcode{true};
\tcode{V} is a copy of $\tcode{v}_i$.
If no such index exists, \tcode{V} is
\tcode{static_cast<R>(std::strong_ordering::equal)}.
contextually converted to \tcode{bool}, yields \tcode{true}.
The return value is a copy of $\tcode{v}_i$
if such an index exists and
\tcode{static_cast<R>(std::strong_ordering::equal)} otherwise.

\pnum
The \defn{common comparison type} \tcode{U}
Expand Down