Skip to content

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

Closed
CaseyCarter wants to merge 1 commit into
cplusplus:mainfrom
CaseyCarter:minmax
Closed

[alg.min.max] Reword min/max/minmax in modern style#6776
CaseyCarter wants to merge 1 commit into
cplusplus:mainfrom
CaseyCarter:minmax

Conversation

@CaseyCarter

@CaseyCarter CaseyCarter commented Jan 17, 2024

Copy link
Copy Markdown
Contributor

... 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

CaseyCarter commented Jan 17, 2024

Copy link
Copy Markdown
Contributor Author

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

@JohelEGP

Copy link
Copy Markdown
Contributor

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

@CaseyCarter

CaseyCarter commented Jan 18, 2024

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

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

Closes #6747.
Closes #6752.

Comment thread source/algorithms.tex Outdated
... to clarify the meaning of "smaller"/"smallest"/"larger"/"largest" with a custom comparison predicate and/or projection.
Comment thread source/algorithms.tex
@tkoeppe

tkoeppe commented Oct 17, 2024

Copy link
Copy Markdown
Contributor

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

@CaseyCarter

Copy link
Copy Markdown
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"? LWG4167

6 participants