This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TC1 status.
224. clear() complexity for associative containers refers to undefined NSection: 23.2.7 [associative.reqmts] Status: TC1 Submitter: Ed Brey Opened: 2000-03-23 Last modified: 2016-01-28
Priority: Not Prioritized
View other active issues in [associative.reqmts].
View all other issues in [associative.reqmts].
View all issues with TC1 status.
Discussion:
In the associative container requirements table in 23.1.2 paragraph 7, a.clear() has complexity "log(size()) + N". However, the meaning of N is not defined.
Proposed resolution:
In the associative container requirements table in 23.1.2 paragraph 7, the complexity of a.clear(), change "log(size()) + N" to "linear in size()
".
Rationale:
It's the "log(size())", not the "N", that is in error: there's no difference between O(N) and O(N + log(N)). The text in the standard is probably an incorrect cut-and-paste from the range version of erase
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4