Created on 2011-05-18.00:00:00 last changed 130 months ago
Proposed resolution:
This wording is relative to the FDIS.
In [futures.overview], header <future> synopsis, fix the declaration of future_errc as follows:
namespace std { enum class future_errc { broken_promise = implementation defined, future_already_retrieved = implementation defined, promise_already_satisfied = implementation defined, no_state = implementation defined }; […] }
In [futures.overview], header <future> synopsis, add a paragraph after paragraph 2 as follows:
The enum values of future_errc are distinct and not zero.[ 2012, Portland: applied to WP ]
[ 2012, Kona ]
Moved to Tentatively Ready by the post-Kona issues processing subgroup.
In [futures.overview] enum class future_errc is defined as follows:
enum class future_errc { broken_promise, future_already_retrieved, promise_already_satisfied, no_state };
With this declaration broken_promise has value 0, which means that for a future_error f with this code
f.code().operator bool()
yields false, which makes no sense. 0 has to be reserved for "no error". So, the enums defined here have to start with 1.
Howard, Anthony, and Jonathan have no objections.[Discussion in Bloomington 2011-08-16]
Previous resolution:
This wording is relative to the FDIS.
In [futures.overview], header <future> synopsis, fix the declaration of future_errc as follows:
namespace std { enum class future_errc {broken_promise,future_already_retrieved = 1, promise_already_satisfied, no_state, broken_promise }; […] }
Is this resolution overspecified? These seem to be all implementation-defined. How do users add new values and not conflict with established error codes?
PJP proxy says: over-specified. boo.
Other error codes: look for is_error_code_enum specializations. Only one exists io_errc
Peter: I don't see any other parts of the standard that specify error codes where we have to do something similar.
Suggest that for every place where we add an error code, the following:
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-02-20 13:20:35 | admin | set | status: wp -> c++14 |
2012-11-03 04:16:46 | admin | set | messages: + msg6262 |
2012-10-25 12:46:45 | admin | set | status: voting -> wp |
2012-10-16 15:35:12 | admin | set | status: ready -> voting |
2012-02-12 18:36:43 | admin | set | messages: + msg5998 |
2012-02-12 18:36:43 | admin | set | status: review -> ready |
2011-08-17 17:30:47 | admin | set | status: new -> review |
2011-05-19 20:40:37 | admin | set | messages: + msg5779 |
2011-05-18 00:00:00 | admin | create |