Re: [Boost-bugs] [Boost C++ Libraries] #2486: thread: no documented thread move support function

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2486: thread: no documented thread move support function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-22 18:45:14


#2486: thread: no documented thread move support function
--------------------------------------+-------------------------------------
 Reporter: vicente.botet@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: thread
  Version: Boost 1.36.0 | Severity: Problem
 Keywords: |
--------------------------------------+-------------------------------------

Comment(by viboes):

 The following is extracted from the standard. Anthony, a little adaptation
 should be enough, isn'it?

 template <class F, class ...Args> thread(F&& f, Args&&... args);
 Requires: F and each type Ti in Args shall be CopyConstructible if an
 lvalue and otherwise MoveConstructible.
 INVOKE(f, w1, w2, ..., wN) (20.7.2) shall be a valid expression for some
 values w1, w2, ..., wN, where N == sizeof...(Args).
 Effects: Constructs an object of type thread and executes INVOKE(f, t1,
 t2, ..., tN) in a new thread of execution, where t1, t2, ..., tN are the
 values in args.... Any return value from f is ignored. If f terminates
 with an uncaught exception, std::terminate() shall be called.
 Synchronization: The invocation of the constructor happens before the
 invocation of f.
 Postconditions: get_id() != id(). *this represents the newly started
 thread.
 Throws: std::system_error if unable to start the new thread.
 Error conditions:
 â€” resource_unavailable_try_again — the system lacked the necessary
 resources to create another thread, or the system-imposed limit on the
 number of threads in a process would be exceeded.

 thread(thread&& x);
 Effects: Constructs an object of type thread from x, and sets x to a
 default constructed state.
 Postconditions: x.get_id() == id() and get_id() returns the value of
 x.get_id() prior to the
 start of construction.
 Throws: Nothing.

 thread assignment
 thread& operator=(thread&& x);
 Effects: If joinable(), calls terminate(). Otherwise, assigns the state of
 x to *this and sets x to a default constructed state.
 Postconditions: x.get_id() == id() and get_id() returns the value of
 x.get_id() prior to the assignment.
 Throws: Nothing.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2486#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC