Title
Rename packaged_task::operator bool()
Status
resolved
Section
[futures.task]
Submitter
INCITS

Created on 2010-08-25.00:00:00 last changed 171 months ago

Messages

Date: 2010-11-13.02:14:14

Proposed resolution:

  1. Change [futures.task]/2, class template packaged_task synopsis as indicated:
    template<class R, class... ArgTypes>
    class packaged_task<R(ArgTypes...)> {
    public:
      typedef R result_type;
      [..]
      explicit operator bool valid() const;
      [..]
    };
    
  2. Change [futures.task] before p. 15 as indicated:
    explicit operator bool valid() const;
    

    15 Returns: true only if *this has an associated asynchronous state.

    16 Throws: nothing.

Date: 2010-11-24.22:04:00

[ Resolved in Batavia by accepting n3194. ]

Date: 2010-11-02.00:00:00

[ 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. ]

Date: 2010-11-02.20:27:27

[ 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).

Date: 2010-10-24.03:04:13

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:23adminsetstatus: nad editorial -> resolved
2010-11-13 02:14:14adminsetmessages: + msg5352
2010-11-13 02:14:14adminsetstatus: open -> nad editorial
2010-11-02 20:27:27adminsetmessages: + msg5270
2010-11-02 20:27:27adminsetmessages: + msg5269
2010-11-02 20:27:27adminsetmessages: + msg5268
2010-10-24 03:04:13adminsetmessages: + msg4967
2010-08-25 00:00:00admincreate