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

[alg.is.permutation] Rephrase to simplify #4071

Merged
merged 2 commits into from Jul 5, 2020

Conversation

CaseyCarter
Copy link
Contributor

Defines last2 and pred for the overloads in std with no parameters by those names so the remainder of the specification need not exhaustively describe each case.

Defines `last2` and `pred` for the overloads in `std` with no parameters by those names so the remainder of the specification need not exhaustively describe each case.
source/algorithms.tex Outdated Show resolved Hide resolved
...and we conventionally use CTAD (`equal_to{}`, `less{}`) for these algorithm specifications.
Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

@jwakely , could 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.

I have a weak preference for equal_to<>{} rather than equal_to{} but that's probably my personal dislike of CTAD in general. The change looks correct, and better than what was there before.

@CaseyCarter
Copy link
Contributor Author

I have a weak preference for equal_to<>{} rather than equal_to{} but that's probably my personal dislike of CTAD in general.

I have no personal stake in CTAD, but the usage is endemic since LWG instructed me to replace the occurrences of equal_to<>{} / less<>{} that P0896 added to the algorithms with equal_to{} and less{}. I believe this algorithm should be consistent with others and a uniform change to non-CTAD should be made separately by someone who cares ;)

@jensmaurer jensmaurer merged commit 39e8f2a into cplusplus:master Jul 5, 2020
@CaseyCarter CaseyCarter deleted the is_perm branch July 7, 2020 16:40
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.

None yet

5 participants