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.
Section: 220.127.116.11 [vector.capacity] Status: Resolved Submitter: Rani Sharoni Opened: 2011-03-29 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [vector.capacity].
View all issues with Resolved status.
In C++1x (N3090) there are two version of vector::resize — 18.104.22.168 [vector.capacity]:
void resize(size_type sz); void resize(size_type sz, const T& c);
The text in 22.214.171.124 [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.
Resolved by adopting the resolution in issue 2033 at this meeting.
Apply the proposed resolution of issue 2033