Title
Effects of resize(size()) on a deque
Status
c++11
Section
[deque.capacity]
Submitter
BSI

Created on 2010-08-25.00:00:00 last changed 94 months ago

Messages

Date: 2017-03-21.22:56:50

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 constructedvalue initialized elements to the sequence.

Date: 2017-03-21.22:56:50

[ 2010 Batavia ]

Accepted with a simplified resolution turning one of the < comparisons into <=.

Date: 2010-10-24.03:04:13

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.

History
Date User Action Args
2017-03-21 22:56:50adminsetmessages: + msg9142
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2011-04-11 11:23:23adminsetstatus: voting -> wp
2011-03-05 15:24:28adminsetstatus: ready -> voting
2010-11-14 16:26:57adminsetstatus: review -> ready
2010-11-13 16:30:04adminsetstatus: open -> review
2010-10-26 13:57:17adminsetmessages: + msg5147
2010-10-24 03:04:13adminsetmessages: + msg4915
2010-08-25 00:00:00admincreate