Created on 2011-02-17.00:00:00 last changed 173 months ago
Proposed resolution:
Alter the declaration of share() to remove the "&&" rvalue qualifier in [futures.unique_future] p. 3, and [futures.unique_future] p. 11:
shared_future<R> share()&&;
[ 2011-02-22 Reflector discussion ]
Moved to Tentatively Ready after 5 votes.
As specified, future<>::share() has the signature
shared_future<R> share() &&;
This means that it can only be applied to rvalues. One of the key benefits of share() is that it can be used with the new auto facility:
std::promise<some_long_winded_type_name> some_promise; auto f = some_promise.get_future(); // std::future auto sf = std::move(f).share();
share() is sufficiently explicit that the move should not be required. We should be able to write:
auto sf = f.share();
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
| 2011-04-11 11:23:23 | admin | set | status: voting -> wp |
| 2011-03-05 15:24:28 | admin | set | status: ready -> voting |
| 2011-02-22 05:40:42 | admin | set | messages: + msg5526 |
| 2011-02-22 05:40:42 | admin | set | status: new -> ready |
| 2011-02-17 19:34:32 | admin | set | messages: + msg5506 |
| 2011-02-17 00:00:00 | admin | create | |