Created on 2016-07-15.00:00:00 last changed 89 months ago
Proposed resolution:
This wording is relative to N4606.
Change [alg.foreach] as indicated:
template<class InputIterator, class Function> Function for_each(InputIterator first, InputIterator last, Function f);[…]
-3- Returns:std::move(f). […]
[ 2016-07 Chicago ]
Monday: P0 - tentatively ready
[alg.foreach] p3 says Returns: std::move(f).
[class.copy] says that since f is a function parameter overload resolution to select the constructor for the return value is first performed as if for an rvalue, so the std::move is redundant. It could be argued that it isn't entirely redundant, because it says that implementations can't do something slightly different like return an lvalue reference that is bound to f, which would prevent it being treated as an rvalue. We should discuss it.History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-01 18:34:48 | admin | set | messages: + msg8285 |
2016-08-01 18:34:48 | admin | set | status: new -> ready |
2016-07-24 20:11:53 | admin | set | messages: + msg8251 |
2016-07-15 00:00:00 | admin | create |