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

[unord.req] Clarify the complexity of clear() method #555

Closed
wants to merge 1 commit into from
Closed

[unord.req] Clarify the complexity of clear() method #555

wants to merge 1 commit into from

Conversation

yegord
Copy link

@yegord yegord commented Oct 25, 2015

From the current formulation it is not very clear, whether the complexity of unordered containers' clear() method is linear in the number of buckets, in the number of elements, or both. Obviously, it should be linear just in the number of elements. If it would be also linear in the number of buckets, then c.clear() would be less efficient then calling c.erase(c.begin(), c.end()), which does not make any sense.

@jwakely
Copy link
Member

jwakely commented Oct 25, 2015

This is not an editorial change, please see https://github.com/cplusplus/draft/blob/master/README.rst

@yegord yegord closed this Oct 25, 2015
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 this pull request may close these issues.

None yet

2 participants