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.req.general]/2 still says view requires constant time destruction #5234

Closed
RedBeard0531 opened this issue Jan 24, 2022 · 2 comments · Fixed by #5235
Closed

[range.req.general]/2 still says view requires constant time destruction #5234

RedBeard0531 opened this issue Jan 24, 2022 · 2 comments · Fixed by #5235
Assignees

Comments

@RedBeard0531
Copy link
Contributor

[range.req.general]/2 says:

The view concept specifies requirements on a range type with constant-time destruction and move operations.

That is no longer true. [range.view]/2.3 says:

if N copies and/or moves are made from an object of type T that contained M elements, then those N objects have O(N+M) destruction

I'm not sure what we want to say exactly instead there. That is vaguely like amortized constant-time, but only if you consider a finite M and an infinite N. Maybe it is best to just have the intro not mention destruction at all?

(I'm assuming that [range.req.general] is considered a non-normative "introduction" so any changes here are editorial. If not, please make this an LWG issue.)

@CaseyCarter
Copy link
Contributor

I think we're overprecise here, resulting in normative duplication which unsurprisingly became out-of-date as the design changed. How about something more generically descriptive like "The view concept specifies requirements for object types that model range and provide operations with predictable complexity."?

@RedBeard0531
Copy link
Contributor Author

That seems fine with me. I'm ok with an imprecise introduction, as long as it isn't inaccurate.

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

Successfully merging a pull request may close this issue.

3 participants