Created on 2011-12-07.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to the FDIS.
Change [alg.remove] as indicated:
template<class ForwardIterator, class T> ForwardIterator remove(ForwardIterator first, ForwardIterator last, const T& value); template<class ForwardIterator, class Predicate> ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, Predicate pred);[…]
-6-Note: each element in the range [ret,last), where ret is the returned value, has a valid but unspecified state, because the algorithms can eliminate elements byswapping with ormoving from elements that were originally in that range.
[ 2012, Portland: applied to WP ]
[ 2012, Kona ]
Move to Ready.
Alisdair notes we could extend permission to use swap if it is available, but there is no interest. Accept the proposed resolution as written.
[alg.remove]/p1 says:
1 Requires: The type of *first shall satisfy the MoveAssignable requirements (Table 22).
This means that remove/remove_if can only use move assignment to permute the sequence. But then [alg.remove]/p6 (non-normatively) contradicts p1:
6 Note: each element in the range [ret,last), where ret is the returned value, has a valid but unspecified state, because the algorithms can eliminate elements by swapping with or moving from elements that were originally in that range.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2012-11-03 04:16:46 | admin | set | messages: + msg6272 |
2012-10-25 12:46:45 | admin | set | status: voting -> wp |
2012-10-16 15:35:12 | admin | set | status: ready -> voting |
2012-02-12 18:36:43 | admin | set | messages: + msg6005 |
2012-02-12 18:36:43 | admin | set | status: new -> ready |
2011-12-08 22:24:12 | admin | set | messages: + msg5958 |
2011-12-07 00:00:00 | admin | create |