This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.
2953. LWG 2853 should apply todeque::erase
too
Section: 23.3.5.4 [deque.modifiers] Status: C++20 Submitter: Tim Song Opened: 2017-03-30 Last modified: 2021-02-25
Priority: 0
View other active issues in [deque.modifiers].
View all other issues in [deque.modifiers].
View all issues with C++20 status.
Discussion:
Most of the discussion of LWG 2853(i) applies, mutatis mutandis, to deque::erase
. The relevant requirements table requires neither Copy/MoveInsertable
nor Copy/MoveConstructible
for the erase operations, so there's no way a copy/move constructor can safely be called.
[2017-07 Toronto Wed Issue Prioritization]
Priority 0; Move to Ready
Proposed resolution:
This wording is relative to N4659.
Change 23.3.5.4 [deque.modifiers] as indicated:
iterator erase(const_iterator position); iterator erase(const_iterator first, const_iterator last); void pop_front(); void pop_back();-4- Effects: […]
-5- Complexity: The number of calls to the destructor ofT
is the same as the number of elements erased, but the number of calls to the assignment operator ofT
is no more than the lesser of the number of elements before the erased elements and the number of elements after the erased elements. -6- Throws: Nothing unless an exception is thrown by the copy constructor, move constructor, assignment operator , or move assignment operator ofT
.
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