-
Notifications
You must be signed in to change notification settings - Fork 8
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
subrange: must end be reachable from begin? #597
Comments
Technically, yes it is. The resulting This seems like the sort of weirdness we should forbid. PR for your perusal. |
This issue is now LWG 3179. |
Does this mean |
No, those are fine. |
"Being a valid range" imposes the reachability condition, but Or, I may be misunderstanding the validity of ranges / |
We have a known issue regarding the definition of valid range in terms of reachability. |
Ah, ok, understood. Thanks for the reply! |
Is it kosher to construct a subrange for which end is not reachable from begin? Say, if begin is reachable from end instead? And
size()
returns a negative number?Probably not. If that is the case, we should require that [begin,end) denotes a valid range.
Proposed Resolution
Change [range.subrange.ctor] as follows:
The text was updated successfully, but these errors were encountered: