Namespaces
Variants
Views
Actions

std::swap(std::packaged_task)

From cppreference.com
< cpp‎ | thread‎ | packaged task
Revision as of 20:22, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class Function, class Args... >

void swap( packaged_task<Function(Args...)> &lhs,

           packaged_task<Function(Args...)> &rhs );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Specializes the std::swap algorithm for std::packaged_task. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs).

Contents

Parameters

lhs, rhs - packaged tasks whose states to swap

Return value

(none)

Exceptions

noexcept specification:  
noexcept
  

Example

See also

Template:cpp/thread/packaged task/dcl list swap