Skip to content

[forwardlist.ops,list.ops] Fix specification of 'unique' LWG2997 #4465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
22 changes: 14 additions & 8 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4724,10 +4724,12 @@
\begin{itemdescr}
\pnum
\effects
Erases all but the first element from every consecutive
group of equal elements referred to by the iterator \tcode{i} in the range \range{first +
1}{last} for which \tcode{*i == *(i-1)} (for the version with no arguments) or \tcode{pred(*i,
*(i - 1))} (for the version with a predicate argument) holds.
Erases all but the first element from every consecutive group of equal elements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #4221 (comment) w.r.t "every consecutive group".

That is, for a nonempty list,
erases all elements referred to by the iterator \tcode{i}
in the range \range{begin() + 1}{end()}
for which \tcode{*i == *(i-1)} (for the version with no arguments) or
\tcode{pred(*i, *(i - 1))} (for the version with a predicate argument) holds.
Invalidates only the iterators and references to the erased elements.

\pnum
Expand Down Expand Up @@ -5416,10 +5418,14 @@
\pnum
\effects
Erases all but the first element from every
consecutive group of equal elements referred to by the iterator \tcode{i} in the range
\range{first + 1}{last} for which \tcode{*i == *(i-1)} (for the version of
\tcode{unique} with no arguments) or \tcode{pred(*i, *(i - 1))} (for the version of
\tcode{unique} with a predicate argument) holds.
consecutive group of equal elements.
That is, for a nonempty list,
erases all elements referred to
by the iterator \tcode{i} in the range \range{begin() + 1}{end()} for which
\tcode{*i == *(i-1)}
(for the version of \tcode{unique} with no arguments) or
\tcode{pred(*i, *(i - 1))}
(for the version of \tcode{unique} with a predicate argument) holds.
Invalidates only the iterators and references to the erased elements.

\pnum
Expand Down