Created on 2010-08-25.00:00:00 last changed 170 months ago
Proposed resolution:
template<class R, class... ArgTypes> class packaged_task<R(ArgTypes...)> { public: typedef R result_type; [..]explicit operatorbool valid() const; [..] };
explicit operatorbool valid() const;15 Returns: true only if *this has an associated asynchronous state.
16 Throws: nothing.
[ Resolved in Batavia by accepting n3194. ]
[ 2010-11-02 Daniel translates proposed wording changes into a proper proposed resolution and verified that no other places implicitly take advantage of packaged_task conversion to bool. ]
[ Resolution proposed by ballot comment: ]
Replaced the name packaged_task::operator bool() with packaged_task::valid() in the synopsis ([futures.task]/2) and the member function specification (before [futures.task.members]/15).
Addresses US-201
packaged_task provides operator bool() to check whether an object has an associated asynchronous state. The various future types provide a member function valid() that does the same thing. The names of these members should be the same.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-11-18 12:46:23 | admin | set | status: nad editorial -> resolved |
2010-11-13 02:14:14 | admin | set | messages: + msg5352 |
2010-11-13 02:14:14 | admin | set | status: open -> nad editorial |
2010-11-02 20:27:27 | admin | set | messages: + msg5270 |
2010-11-02 20:27:27 | admin | set | messages: + msg5269 |
2010-11-02 20:27:27 | admin | set | messages: + msg5268 |
2010-10-24 03:04:13 | admin | set | messages: + msg4967 |
2010-08-25 00:00:00 | admin | create |