Skip to content
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

[associative.reqmts.general] Fix confusing local use of 'r' #5138

Merged
merged 1 commit into from Jan 14, 2022

Conversation

jensmaurer
Copy link
Member

Fixes #5134

@jensmaurer jensmaurer changed the title [associative.reqmts.general] Fix incorrect local use of 'r' [associative.reqmts.general] Fix confusing local use of 'r' Dec 4, 2021
@@ -1710,21 +1710,24 @@
\tcode{c} denotes a possibly \keyword{const} value of type \tcode{X::key_compare};
\item
\tcode{kl} is a value such that \tcode{a} is partitioned\iref{alg.sorting}
with respect to \tcode{c(r, kl)}, with \tcode{r} the key value of \tcode{e}
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate the heavy maths jargon here, and even though it resonates on a personal level, I think it's maybe a bit unnecessary in a general text. What do you think of changing this to the more normal "where r is the key value of e and e is in [or "an element of"] a"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, the existing text already has the phrase; we're just replacing "r" with "x" and making sure the phrase is duplicated everywhere "x" is used.

The later bullets already contain a "with" phrase, so continuing with "where" is a bit inconsistent.

Copy link
Member Author

@jensmaurer jensmaurer Dec 4, 2021

Choose a reason for hiding this comment

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

(If we want to improve clarity here, adding "all" would probably also be helpful. But maybe that's implied by "partitioned".)

Copy link
Contributor

Choose a reason for hiding this comment

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

It's the "consistency with a bad idea" thing... OK, let's make the change as is, and maybe we can rephrase everything afterwards.

Copy link
Contributor

Choose a reason for hiding this comment

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

(Note to selves: revisit this.)

@jensmaurer
Copy link
Member Author

@jwakely , @StephanTLavavej , please have a look.

Copy link
Member

@jwakely jwakely left a comment

Choose a reason for hiding this comment

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

As I noted in #5134 it would be a smaller edit to change the first r which is the one that introduced the problem (the cases being changed were there first, since C++14).

But this is also OK. We'd need some of these changes to ensure r is defined for the bullets following (8.19) anyway.

@jensmaurer
Copy link
Member Author

@tkoeppe, this seems ready.

@tkoeppe tkoeppe merged commit 872fce6 into cplusplus:main Jan 14, 2022
@jensmaurer jensmaurer deleted the c36 branch January 14, 2022 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[associative.reqmts.general] introduces r with two different meanings
4 participants