Created on 2011-11-02.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to the FDIS.
Change [futures.unique_future] paragraph 15 as indicated:
R future::get();
…
-15- Returns:future::get() returns the value v stored in the object’s shared
state as std::move(v). If the type of the value is MoveAssignable
the returned value is moved, otherwise it is copied.
[ 2011-11-28 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
[futures.unique_future] paragraph 15 says the following:
R future::get();
…
-15- Returns:future::get() returns the value stored in the object’s shared state. If the type of the value is MoveAssignable the returned value is moved, otherwise it is copied.
…There are some problems with the description:
"If the type of the value is MoveAssignable the returned value is moved, otherwise it is copied."The last criticism I have is about the part
"the returned value is moved, otherwise it is copied" because an implementation won't be able to recognize what the user-defined type will do during an expression that is prepared by the implementation. I think the wording is intended to allow a move by seeding with an rvalue expression via std::move (or equivalent), else the result will be an effective copy construction.History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2012-02-12 18:36:43 | admin | set | status: voting -> wp |
2012-02-09 04:07:48 | admin | set | status: ready -> voting |
2011-11-28 18:46:18 | admin | set | messages: + msg5925 |
2011-11-28 18:46:18 | admin | set | status: new -> ready |
2011-11-27 20:38:11 | admin | set | messages: + msg5922 |
2011-11-02 00:00:00 | admin | create |