Difference between revisions of "cpp/thread/packaged task/swap2"
From cppreference.com
< cpp | thread | packaged task
m (Text replace - "{{example cpp" to "{{example") |
m (Text replace - "{{cpp|" to "{{c|") |
||
Line 9: | Line 9: | ||
{{ddcl list end}} | {{ddcl list end}} | ||
− | Specializes the {{ | + | Specializes the {{c|std::swap}} algorithm for {{c|std::packaged_task}}. Exchanges the state of {{tt|lhs}} with that of {{tt|rhs}}. Effectively calls {{c|lhs.swap(rhs)}}. |
===Parameters=== | ===Parameters=== |
Revision as of 21:11, 19 April 2012
Template:cpp/thread/packaged task/sidebar Template:ddcl list begin <tr class="t-dcl ">
<td class="t-dcl-nopad">template< class Function, class Args... >
</td>
void swap( packaged_task<Function(Args...)> &lhs,
<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
This section is incomplete Reason: no example |