Skip to content

[priqueue.members] [queue.mod] [stack.mod] Harmonize push_range wording #6388

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 9 additions & 9 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13630,9 +13630,9 @@
\begin{itemdescr}
\pnum
\effects
Equivalent to \tcode{c.append_range(std::forward<R>(rg))}
if that is a valid expression,
otherwise \tcode{ranges::copy(rg, back_inserter(c))}.
Adds the elements of \tcode{rg} to \tcode{c}
Copy link
Contributor

@CaseyCarter CaseyCarter Jul 18, 2023

Choose a reason for hiding this comment

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

For other reviewers: c.append_range(rg) is equivalent to c.append_range(std::forward<R>(rg)) since append_range for a standard container doesn't care about the value category of its input_range argument.

Dropping the "Equivalent to" Words of Power is non-editorial, however, which I failed to point out when we discussed this change earlier. "via" doesn't have the same fully-specified meaning. Could we rephrase these as Equivalent to \tcode{c.append_range(rg)} if that is a valid expression, otherwise equivalent to \tcode{ranges::copy(rg, back_inserter(c))}.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropping the "Equivalent to" Words of Power is non-editorial

I was afraid of that. I do want to point out that the current wording is "Equivalent to ..." in 2 places and "Inserts ... via ..." in the 3rd place, which is again bizarrely inconsistent; and IIUC we can't harmonize all 3 in either direction without one of the changes being non-editorial in this sense. I can bring this back in a real paper if we need me to.

Once I'm not trying to be editorial, I'll go even further and suggest replacing the word "via" with "as if by".

via \tcode{c.append_range(rg)} if that is a valid expression,
or \tcode{ranges::copy(rg, back_inserter(c))} otherwise.
\end{itemdescr}

\rSec3[queue.ops]{Operators}
Expand Down Expand Up @@ -14187,9 +14187,9 @@
\begin{itemdescr}
\pnum
\effects
Inserts all elements of \tcode{rg} in \tcode{c} via
\tcode{c.append_range(std::forward<R>(rg))} if that is a valid expression, or
\tcode{ranges::copy(rg, back_inserter(c))} otherwise.
Adds the elements of \tcode{rg} to \tcode{c}
via \tcode{c.append_range(rg)} if that is a valid expression,
or \tcode{ranges::copy(rg, back_inserter(c))} otherwise.
Then restores the heap property as if by
\tcode{make_heap(c.begin(), c.end(), comp)}.

Expand Down Expand Up @@ -14497,9 +14497,9 @@
\begin{itemdescr}
\pnum
\effects
Equivalent to \tcode{c.append_range(std::forward<R>(rg))}
if that is a valid expression,
otherwise \tcode{ranges::copy(rg, back_inserter(c))}.
Adds the elements of \tcode{rg} to \tcode{c}
via \tcode{c.append_range(rg)} if that is a valid expression,
or \tcode{ranges::copy(rg, back_inserter(c))} otherwise.
\end{itemdescr}

\rSec3[stack.ops]{Operators}
Expand Down