Boost C++ Libraries: Ticket #2486: thread: no documented thread move support function https://svn.boost.org/trac10/ticket/2486 <p> The following move support functions are not docummented on the documentation. </p> <p> #ifdef BOOST_HAS_RVALUE_REFS </p> <blockquote> <p> template &lt;class F&gt; thread(F&amp;&amp; f); thread(thread&amp;&amp; other); thread&amp; operator=(thread&amp;&amp; other); thread&amp;&amp; move(); </p> </blockquote> <p> #else #ifdef BOOST_NO_SFINAE #else </p> <blockquote> <p> template &lt;class F&gt; explicit thread(F f,typename disable_if&lt;boost::is_convertible&lt;F&amp;,detail::thread_move_t&lt;F&gt; &gt;, dummy* &gt;::type=0) </p> </blockquote> <p> #endif </p> <blockquote> <p> template &lt;class F&gt; explicit thread(detail::thread_move_t&lt;F&gt; f); thread(detail::thread_move_t&lt;thread&gt; x); thread&amp; operator=(detail::thread_move_t&lt;thread&gt; x); operator detail::thread_move_t&lt;thread&gt;(); detail::thread_move_t&lt;thread&gt; move(); </p> </blockquote> <p> #endif </p> <p> Even if the semantics of these functions could be induced for completud it will be good to add them to the reference documentation. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2486 Trac 1.4.3 viboes Sun, 22 Nov 2009 18:45:13 GMT <link>https://svn.boost.org/trac10/ticket/2486#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2486#comment:1</guid> <description> <p> The following is extracted from the standard. Anthony, a little adaptation should be enough, isn'it? </p> <p> template &lt;class F, class ...Args&gt; thread(F&amp;&amp; f, Args&amp;&amp;... args); Requires: F and each type Ti in Args shall be <a class="missing wiki">CopyConstructible</a> if an lvalue and otherwise <a class="missing wiki">MoveConstructible</a>. 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. </p> <p> thread(thread&amp;&amp; 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. </p> <p> thread assignment thread&amp; operator=(thread&amp;&amp; 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. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Anthony Williams</dc:creator> <pubDate>Mon, 07 Jun 2010 09:04:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2486#comment:2 https://svn.boost.org/trac10/ticket/2486#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Added documentation for move constructor on trunk </p> Ticket