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

[ranges] The explicity of the constructor needs to be consistent #5505

Open
hewillk opened this issue Jun 3, 2022 · 2 comments
Open

[ranges] The explicity of the constructor needs to be consistent #5505

hewillk opened this issue Jun 3, 2022 · 2 comments

Comments

@hewillk
Copy link
Contributor

hewillk commented Jun 3, 2022

  • C++20 range adaptors such as filter_view, transform_view, take_view, take_while_view, drop_view, drop_while_view have no explicit keyword in their constructors.
    However, C++23 range adaptors such as chunk_­view, slide_view, and chunk_by_view all have the explicit keyword in their constructors.
    We should make them consistent.
  • Also, in the current CTAD of all range adaptors, only join_view has the explicit keyword, do we need to remove this seemingly redundant explicit?
@JohelEGP
Copy link
Contributor

JohelEGP commented Jun 3, 2022

The first point is LWG material. The second point is part of LWG3451.

@hewillk
Copy link
Contributor Author

hewillk commented Jun 3, 2022

Thanks for pointing out the second point.
Regarding the first point, I don't know how we should choose, because I don't see any observable benefit or harm from explicit.

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

No branches or pull requests

2 participants