-
Notifications
You must be signed in to change notification settings - Fork 52
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
sg14::ring_span not compatible with range-v3 (not a semiregular type) #127
Comments
Default-constructible iterators makes sense to me. Default-constructible (The answers would presumably be similar to whatever ...Although, to be clear, I personally would be fine with sticking to our philosophical guns and saying that rings and iterators do not have partially-formed states, and if you want a "maybe-ring" type, you should use |
Sorry for delay in replying. Default-constructable iterators/span should be allowed, and as you suggest should leave the object in a partially-formed state where only valid operation is assignment to properly-initialized span/iterator. It would be "crazy" to do a check :) I must say: I'm not really an expert in this stuff. |
The Ranges TS does not require default-constructed ranges to be in the domain of any range operations ( There are some requirements on value-initialized forward iterators that we "inherited" from the IS: value-initialized iterators should behave is if they denote the same empty range. Given a value-initialized forward iterator The TS requires that |
What is the motivation for |
Not necessarily "false"; more like what you said next: there could be a precondition that you're not allowed to call Casey's answer implies that this is okay as far as the Concepts are concerned:
And yes, this is super confusing and ugly, thanks for asking. "I personally would be fine with sticking to our philosophical guns and saying that rings and iterators do not have partially-formed states, and if you want a "maybe-ring" type, you should use Anyway, pull requests welcome AFAIC and I'll happily merge whatever looks good to people; I'm unlikely to initiate any patches on my own. |
ring_span is not a semiregular type, because it (and its iterator) lack default constructors. There may be other operations missing. Assuming addition of these does not negatively impact performance, it would be nice for both libraries to interoperate without friction.
The text was updated successfully, but these errors were encountered: