Skip to content

Commit 2ffad63

Browse files
committed
P3914R0: Re NB US 160-260 (C++26 CD)
Fixes NB US 160-260 (C++26 CD).
1 parent 5e49eff commit 2ffad63

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

source/algorithms.tex

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7839,9 +7839,11 @@
78397839
\pnum
78407840
Let \tcode{pred} be \tcode{equal_to\{\}}
78417841
for the overloads with no parameter \tcode{pred}, and
7842-
let $E$ be
7842+
let $E(\tcode{i})$ be
78437843
\begin{itemize}
78447844
\setlength{\emergencystretch}{1em}
7845+
\item
7846+
\tcode{false} if \tcode{i} is equal to \tcode{first}; otherwise
78457847
\item
78467848
\tcode{bool(pred(*(i - 1), *i))}
78477849
for the overloads in namespace \tcode{std};
@@ -7859,10 +7861,9 @@
78597861

78607862
\pnum
78617863
\effects
7862-
For a nonempty range, eliminates all but the first element
7863-
from every consecutive group of equivalent elements referred to
7864+
Eliminates all elements referred to
78647865
by the iterator \tcode{i} in the range \range{first + 1}{last}
7865-
for which $E$ is \tcode{true}.
7866+
for which $E(\tcode{i})$ is \tcode{true}.
78667867

78677868
\pnum
78687869
\returns
@@ -7942,6 +7943,8 @@
79427943
let $E(\tcode{i})$ be
79437944
\begin{itemize}
79447945
\setlength{\emergencystretch}{1em}
7946+
\item
7947+
\tcode{false} if \tcode{i} is equal to \tcode{first}; otherwise
79457948
\item
79467949
\tcode{bool(pred(*i, *(i - 1)))}
79477950
for the overloads in namespace \tcode{std};
@@ -7954,13 +7957,13 @@
79547957
Let:
79557958
\begin{itemize}
79567959
\item
7957-
$M$ be the number of iterators \tcode{i} in the range \range{first + 1}{last}
7960+
$M$ be the number of iterators \tcode{i} in the range \range{first}{last}
79587961
for which $E(\tcode{i})$ is \tcode{false};
79597962
\item
7960-
\tcode{result_last} be \tcode{result + $M$ + 1}
7963+
\tcode{result_last} be \tcode{result + $M$}
79617964
for the overloads with no parameter \tcode{result_last} or \tcode{result_r};
79627965
\item
7963-
$N$ be $\min(M + 1, \ \tcode{result_last - result})$.
7966+
$N$ be $\min(M, \ \tcode{result_last - result})$.
79647967
\end{itemize}
79657968

79667969
\pnum
@@ -8006,9 +8009,9 @@
80068009

80078010
\pnum
80088011
\effects
8009-
Copies only the first element from $N$ consecutive groups of equivalent elements
8010-
referred to by the iterator \tcode{i} in the range \range{first + 1}{last}
8011-
for which $E(\tcode{i})$ holds
8012+
Copies only the first $N$ elements
8013+
referred to by the iterator \tcode{i} in the range \range{first}{last}
8014+
for which $E(\tcode{i})$ is \tcode{true}
80128015
into the range \range{result}{result + $N$}.
80138016

80148017
\pnum
@@ -8020,13 +8023,13 @@
80208023
\item
80218024
\tcode{\{last, result + $N$\}}
80228025
for the overloads in namespace \tcode{ranges},
8023-
if $N$ is equal to $M + 1$.
8026+
if $N$ is equal to $M$.
80248027
\item
80258028
Otherwise, \tcode{\{j, result_last\}}
80268029
for the overloads in namespace \tcode{ranges},
8027-
where \tcode{j} is the iterator in \range{first + 1}{last}
8030+
where \tcode{j} is the iterator in \range{first}{last}
80288031
for which $E(\tcode{j})$ is \tcode{false}
8029-
and there are exactly $N - 1$ iterators \tcode{i} in \range{first + 1}{j}
8032+
and there are exactly $N$ iterators \tcode{i} in \range{first}{j}
80308033
for which $E(\tcode{i})$ is \tcode{false}.
80318034
\end{itemize}
80328035

0 commit comments

Comments
 (0)