This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
promise::set_valueSection: 32.10.6 [futures.promise] Status: Resolved Submitter: Jonathan Wakely Opened: 2009-12-18 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [futures.promise].
View all issues with Resolved status.
Discussion:
In 32.10.6 [futures.promise]
Does promise<R>::set_value return normally if the copy/move
constructor of R throws?
The exception could be caught and set using
promise<R>::set_exception, or it could be allowed to leave the
set_value call, but it's not clear which is intended. I suggest the
exception should not be caught.
N.B. This doesn't apply to promise<R&>::set_value or
promise<void>::set_value because they don't construct a new
object.
[
2010 Pittsburgh: Moved to NAD Editorial. Rationale added below.
]
Rationale:
Solved by N3058.
Proposed resolution:
Change 32.10.6 [futures.promise]/18:
18 Throws:
future_errorif its associated state is already ready.