Title
Missing specification of vector::resize(size_type)
Status
resolved
Section
[vector.capacity]
Submitter
Rani Sharoni

Created on 2011-03-29.00:00:00 last changed 155 months ago

Messages

Date: 2012-02-27.21:48:49

Proposed resolution:

Apply the proposed resolution of issue 2033

Date: 2012-02-27.21:48:49

[ 2012, Kona ]

Resolved by adopting the resolution in issue 2033 at this meeting.

Date: 2011-08-17.12:17:15

[ 2011 Bloomington ]

This issue will be resolved by issue 2033, and closed when this issue is applied.

Date: 2011-06-12.00:00:00

[ 2011-06-12: Daniel comments ]

The proposed resolution for issue 2033 should solve this issue as well.

Date: 2011-03-29.00:00:00

In C++1x (N3090) there are two version of vector::resize[vector.capacity]:

void resize(size_type sz);
void resize(size_type sz, const T& c);

The text in [vector.capacity]/12 only mentions "no effects on throw" for the two args version of resize:

Requires: If an exception is thrown other than by the move constructor of a non-CopyConstructible T there are no effects.

This seems like unintentional oversight since resize(size) is semantically the same as resize(size, T()). Additionally, the C++03 standard only specify single version of resize with default for the second argument - 23.2.4:

void resize(size_type sz, T c = T());

Therefore not requiring same guarantees for both version of resize is in fact a regression.

History
Date User Action Args
2012-02-27 21:48:49adminsetmessages: + msg6043
2011-08-17 12:17:15adminsetmessages: + msg5862
2011-08-17 12:17:15adminsetstatus: new -> resolved
2011-06-13 13:14:58adminsetmessages: + msg5817
2011-06-12 20:55:08adminsetmessages: + msg5816
2011-03-29 00:00:00admincreate