This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++11 status.
1418. Effects ofresize(size())
on a deque
Section: 23.3.5.3 [deque.capacity] Status: C++11 Submitter: BSI Opened: 2010-08-25 Last modified: 2017-03-21
Priority: Not Prioritized
View all other issues in [deque.capacity].
View all issues with C++11 status.
Discussion:
Addresses GB-113
There is no mention of what happens if sz==size()
. While it obviously does nothing I feel a standard needs to say this explicitely.
[ 2010 Batavia ]
Accepted with a simplified resolution turning one of the <
comparisons into <=.
Proposed resolution:
Ammend [deque.capacity]
void resize(size_type sz);
Effects: If sz < = size()
, equivalent to erase(begin() + sz, end());
. If size() < sz
, appends sz - size()
default constructed value initialized elements to the sequence.
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