Skip to content

[alg.min.max] Reword min/max/minmax in modern style #6776

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

Conversation

CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Jan 17, 2024

... to clarify the meaning of "smaller"/"smallest"/"larger"/"largest" with a custom comparison predicate and/or projection by effectively replacing those terms with code.

Closes #6747.
Closes #6752.

@CaseyCarter
Copy link
Contributor Author

CaseyCarter commented Jan 17, 2024

This is all editorial, but probably a big enough change that LWG should sign off on it anyway.

@JohelEGP
Copy link
Contributor

This looks like a superset of #6752 to address #6747.

@CaseyCarter
Copy link
Contributor Author

CaseyCarter commented Jan 18, 2024

This doesn't exactly address #6747, which wants to replace "smaller" and "larger" with "lesser" and "greater". I want to get rid of the terms altogether and more directly explain what these algorithms do with a custom predicate and projection. In no way does std::min(4, 7, std::greater{}) return the "smaller" or "lesser" value of 4 and 7.

(But yes - thanks - the issue and PR do seem to be at least related.)

@JohelEGP
Copy link
Contributor

Right.
Since they're incompatible, I suppose you should add this to the opening comment:

Closes #6747.
Closes #6752.

... to clarify the meaning of "smaller"/"smallest"/"larger"/"largest" with a custom comparison predicate and/or projection.
@tkoeppe
Copy link
Contributor

tkoeppe commented Oct 17, 2024

@jwakely I'd welcome your LWG perspective if this is OK editorially.

@CaseyCarter
Copy link
Contributor Author

The contents of this PR are new the proposed resolution of LWG-4167.

@CaseyCarter CaseyCarter deleted the minmax branch October 20, 2024 06:19
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.

Replace "smaller" with "lower" and "larger" with "greater"?
6 participants