Difference between revisions of "cpp/thread/packaged task/swap2"
From cppreference.com
< cpp | thread | packaged task
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
m (Shorten template names. Use {{lc}} where appropriate.) |
||
Line 1: | Line 1: | ||
{{cpp/title | swap<small>(std::packaged_task)</small>}} | {{cpp/title | swap<small>(std::packaged_task)</small>}} | ||
{{cpp/thread/packaged_task/navbar}} | {{cpp/thread/packaged_task/navbar}} | ||
− | {{ | + | {{dcl begin}} |
− | {{ | + | {{dcl | |
template< class Function, class Args... > | template< class Function, class Args... > | ||
void swap( packaged_task<Function(Args...)> &lhs, | void swap( packaged_task<Function(Args...)> &lhs, | ||
packaged_task<Function(Args...)> &rhs ); | packaged_task<Function(Args...)> &rhs ); | ||
}} | }} | ||
− | {{ | + | {{dcl end}} |
− | Specializes the {{ | + | Specializes the {{lc|std::swap}} algorithm for {{lc|std::packaged_task}}. Exchanges the state of {{tt|lhs}} with that of {{tt|rhs}}. Effectively calls {{c|lhs.swap(rhs)}}. |
===Parameters=== | ===Parameters=== | ||
− | {{ | + | {{par begin}} |
− | {{ | + | {{par | lhs, rhs | packaged tasks whose states to swap}} |
− | {{ | + | {{par end}} |
===Return value=== | ===Return value=== | ||
Line 29: | Line 29: | ||
===See also=== | ===See also=== | ||
− | {{ | + | {{dsc begin}} |
− | {{ | + | {{dsc inc | cpp/thread/packaged_task/dcl list swap}} |
− | {{ | + | {{dsc end}} |
[[de:cpp/thread/packaged task/swap2]] | [[de:cpp/thread/packaged task/swap2]] |
Revision as of 20:01, 31 May 2013
template< class Function, class Args... > void swap( packaged_task<Function(Args...)> &lhs, |
||
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 |