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

[range.repeat] Change template parameter name W to T #5903

Merged
merged 1 commit into from Dec 16, 2022

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Oct 13, 2022

Currently, the first template parameter of repeat_view is called W, which is consistent with iota_view.

However, such consistency makes wrong suggestions, because two W's have totally different constraints. Presumably W comes from weakly_incrementable, which is not related to the first template parameter of repeat_view.

This PR changes W to T, because T is a general name for type template parameters, and the constraints of move_constructible are relatively loose. And it also changes WArgs to TArgs for mirroring BoundArgs. I'm not sure whether the plain Args would be better.

Fixes #5902.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 8, 2022

Could you provide a bit of rationale, and explanation of the status quo?

@frederick-vs-ja
Copy link
Contributor Author

Could you provide a bit of rationale, and explanation of the status quo?

Yep. I've added them to the description.

@tkoeppe tkoeppe added the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Dec 16, 2022
@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 16, 2022

@frederick-vs-ja Could you please rebase?

@frederick-vs-ja
Copy link
Contributor Author

@tkoeppe OK. I've rebased and force-pushed the branch.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 16, 2022

@jwakely, @CaseyCarter Could you please have a look?

Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

LGTM. I confirmed there are no unreplaced occurrences of W or WArgs in the subclause.

@tkoeppe tkoeppe removed the needs rebase The pull request needs a git rebase to resolve merge conflicts. label Dec 16, 2022
@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 16, 2022

Many thanks!

@tkoeppe tkoeppe merged commit ae88bb5 into cplusplus:main Dec 16, 2022
@frederick-vs-ja frederick-vs-ja deleted the patch-repeat_view branch December 16, 2022 16:43
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.

[range.repeat] The template parameter name W is confusing
4 participants