Namespaces
Variants
Views
Actions

std::swap(std::function)

From cppreference.com
< cpp‎ | utility‎ | functional‎ | function
Revision as of 14:53, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Function objects


Function wrappers
(C++11)
(C++11)
Bind
(C++11)
Reference wrappers
(C++11)(C++11)
Operator wrappers
Negators
Deprecated binders and adaptors
(deprecated)
(deprecated)
(deprecated)
(deprecated)
(deprecated)(deprecated)(deprecated)(deprecated)
(deprecated)
(deprecated)(deprecated)(deprecated)(deprecated)
(deprecated)(deprecated)
(deprecated)(deprecated)
 
 

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 R, class Args... >
void swap( function<R(Args...)> &lhs, function<R(Args...)> &rhs );
</td>

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

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

Contents

Parameters

lhs, rhs - polymorphic function wrappers whose states to swap

Return value

(none)

Exceptions

(none)

Example

See also

swaps the contents
(public member function) [edit]