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.counted] Misplaced [range.counted] #2894

Closed
frederick-vs-ja opened this issue May 24, 2019 · 3 comments
Closed

[range.counted] Misplaced [range.counted] #2894

frederick-vs-ja opened this issue May 24, 2019 · 3 comments

Comments

@frederick-vs-ja
Copy link
Contributor

view::counted is specified as a customization point object only. I think view::counted isn't designed to accept a range as its first argument, so it shouldn't be a range adaptor object.

However, [range.counted] is put in [range.adaptors] currently (N4810). How about move it to [range.factories]?

@JohelEGP
Copy link
Contributor

See also ericniebler/stl2#625.

@jensmaurer
Copy link
Member

jensmaurer commented May 24, 2019

@CaseyCarter, your view on this?

@CaseyCarter
Copy link
Contributor

It's not a range adaptor object, nor specified to be a range adaptor object. I do consider it nevertheless to be a range adaptor: it adapts the counted range [i, n) into the iterator+sentinel range [i, i+n) when i is random access or [counted_iterator{i, n}, default_sentinel) otherwise.

I think the source of the confusion here and in ericniebler/stl2#625 is that we've applied the too-generic term "range adaptor" - by association with the terms "range adaptor object" and "range adaptor closure object" - to a subset of the things that can reasonably be considered to adapt ranges. Ideally we'd devise a more specific name for that subset.

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

4 participants