Skip to content

Commit 78300aa

Browse files
authored
[class.compare] Don't introduce V for the return value (#6035)
In both cases, I'm not sure introducing `V` helps much - just requires name lookup for `V`. If we just say "the return value" in every case, I think that's clearer.
1 parent 10e2799 commit 78300aa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

source/classes.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6503,16 +6503,16 @@
65036503
is usable\iref{class.compare.default}.
65046504

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

65176517
\pnum
65186518
\begin{example}
@@ -6611,7 +6611,7 @@
66116611
\end{itemize}
66126612

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

66306630
\pnum
66316631
The \defn{common comparison type} \tcode{U}

0 commit comments

Comments
 (0)