-
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
: clear () member function gone awol
#165
Comments
For Consider
If you really want to leave the contents of the underlying array untouched, then you could just use the assignment operator:
With that new information, does |
@Quuxplusone Thanks for responding. I was looking at this implementation. I tried assignment, but then the compiler balked, not, when I do it the way you posted. So, yes that is a solution. Having said that. Because we have people [probably not SG14's target group] who might want to put I think the design needs more work, because of this. I understand that unique_ptr's cause ownership issues (in this case, normally they try to solve them), but let's start and make this work well and as good as possible for pods (i.e. trivially_destructable and what have you). It needs to work well for all cases, though, as there is no alternative |
Maybe I'm missing a point, but having a
clear()
member function seems rather useful [popping them one by one vs. doing it O(1)] to me.Iff theIt is assignable, but not how I tried to do that. So if I have asg14::ring_span
would be assignable, I could do without, but that doesn't seem to be the case either.sg14::ring_span
as a class member, the only option is to pop till it drops :-) .The text was updated successfully, but these errors were encountered: