This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

### 2066. Missing specification of `vector::resize(size_type)`

Section: 24.3.11.3 [vector.capacity] Status: Resolved Submitter: Rani Sharoni Opened: 2011-03-29 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [vector.capacity].

View all other issues in [vector.capacity].

View all issues with Resolved status.

Discussion:

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

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

The text in 24.3.11.3 [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.

[2011-06-12: Daniel comments]

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

[ 2011 Bloomington ]

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

[2012, Kona]

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

Proposed resolution:

Apply the proposed resolution of issue 2033