Namespaces
Variants
Views
Actions

std::swap(std::function)

From cppreference.com
< cpp‎ | utility‎ | functional‎ | function
Revision as of 22:37, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
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< class R, class Args... >
void swap( function<R(Args...)> &lhs, function<R(Args...)> &rhs );

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

Contents

[edit] Parameters

lhs, rhs - polymorphic function wrappers whose states to swap

[edit] Return value

(none)

[edit] Exceptions

(none)

[edit] Example

[edit] See also

swaps the contents
(public member function) [edit]