Created on 2011-11-14.00:00:00 last changed 131 months ago
Proposed resolution:
This wording is relative to the FDIS.
Change [futures.promise]/16 as indicated:
void promise::set_value(const R& r); void promise::set_value(R&& r); void promise<R&>::set_value(R& r); void promise<void>::set_value();[…]
-16- Throws:
- future_error if its shared state already has a stored value or exception, or
- for the first version, any exception thrown by the
copy constructor ofconstructor selected to copy an object of R, or- for the second version, any exception thrown by the
move constructor ofconstructor selected to move an object of R.
Change [futures.promise]/22 as indicated:
void promise::set_value_at_thread_exit(const R& r); void promise::set_value_at_thread_exit(R&& r); void promise<R&>::set_value_at_thread_exit(R& r); void promise<void>::set_value_at_thread_exit();[…]
-16- Throws:future_error if an error condition occurs.
- future_error if its shared state already has a stored value or exception, or
- for the first version, any exception thrown by the constructor selected to copy an object of R, or
- for the second version, any exception thrown by the constructor selected to move an object of R.
[ 2013-04-20, Bristol ]
Accepted for the working paper
[ 2012, Portland: move to Review ]
Moved to Review by the concurrency working group, with no further comments.
[futures.promise]/16 says that promise::set_value(const R&) throws any exceptions thrown by R's copy constructor, and that promise_set_value(R&&) throws any exceptions thrown by R's move constructor.
[futures.promise]/22 is the Throws: clause for promise::set_value_at_thread_exit. It has no corresponding requirements, only that these functions throw "future_error if an error condition occurs." Daniel suggests wording to fix this: The approach is a bit more ambitious and also attempts to fix wording glitches of [futures.promise]/16, because it would be beyond acceptable efforts of implementations to determine whether a constructor call of a user-defined type will indeed call a copy constructor or move constructor (in the first case it might be a template constructor, in the second case it might also be a copy-constructor, if the type has no move constructor).History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2013-04-25 19:07:07 | admin | set | status: voting -> wp |
2013-04-20 08:17:49 | admin | set | messages: + msg6492 |
2013-04-20 08:17:49 | admin | set | status: review -> voting |
2012-11-02 22:48:46 | admin | set | messages: + msg6238 |
2012-11-02 22:48:46 | admin | set | status: new -> review |
2011-11-28 20:03:03 | admin | set | messages: + msg5927 |
2011-11-14 00:00:00 | admin | create |