This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofResolved status.
future::valid should be callable on an invalid futureSection: 32.10.7[futures.unique.future]Status:ResolvedSubmitter: Jonathan WakelyOpened: 2009-11-22Last modified: 2021-06-06
Priority:Not Prioritized
View all otherissues in [futures.unique.future].
View all issues withResolved status.
Discussion:
[futures.unique_future]/3 says:
The effect of calling any member function other than the destructor orthe move-assignment operator on a
futureobject for whichvalid() == falseis undefined.
This means callingfuture::valid() is undefined unless it willreturntrue, so you can only use it if you know the answer!
[2009-12-08 Moved to Tentatively Ready after 5 positive votes on c++std-lib.]
[2010 Pittsburgh:]
Moved to
NAD EditorialResolved. Rationale added below.
Rationale:
Solved byN3058.
Proposed resolution:
Change [futures.unique_future]/3:
The effect of calling any member function other than thedestructor, or the move-assignment operator, or
valid, on afutureobject for whichvalid()== falseis undefined.