Created on 2013-09-21.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to N3691.
Edit [deque.capacity]/4 as indicated:
void resize(size_type sz, const T& c);[…]
-4- Requires: T shall beMoveInsertable into *this andCopyInsertable into *this.
Edit [vector.capacity]/16+17 as indicated:
void resize(size_type sz, const T& c);[…]
-16- Requires: T shall beMoveInsertable into *this andCopyInsertable into *this. -17- Remarks: If an exception is thrownother than by the move constructor of a non-CopyInsertable Tthere are no effects.
[ Issaquah 2014-02-11: Move to Immediate ]
First, [deque.capacity]/4 and [vector.capacity]/16 say that resize(size_type sz, const T& c) "Requires: T shall be MoveInsertable into *this and CopyInsertable into *this." The CopyInsertable requirement is correct (because sz might be size() + 2 or more), but the MoveInsertable requirement is redundant due to [container.requirements.general]/13: "T is CopyInsertable into X means that, in addition to T being MoveInsertable into X, the [...]". (LWG 2033's resolution said that this was "not redundant, because CopyInsertable is not necessarily a refinement of MoveInsertable" which was true at the time, but then LWG 2177's resolution made it a refinement.)
Second, [vector.capacity]/17 says "Remarks: If an exception is thrown other than by the move constructor of a non-CopyInsertable T there are no effects." This is confusing because T is required to be CopyInsertable. (/14 says the same thing for resize(size_type sz), where it is correct because that overload requires only MoveInsertable and DefaultInsertable.)History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-27 17:03:20 | admin | set | status: wp -> c++14 |
2014-02-20 13:52:38 | admin | set | status: immediate -> wp |
2014-02-13 06:35:03 | admin | set | messages: + msg6834 |
2014-02-13 06:35:03 | admin | set | status: new -> immediate |
2013-10-11 21:09:07 | admin | set | messages: + msg6714 |
2013-09-21 00:00:00 | admin | create |