C++ Functional Library - swap(std::function)



Description

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

Declaration

Following is the declaration for std::swap.

template< class R, class... Args >
void swap( function<R(Args...)> &lhs, function<R(Args...)> &rhs );

C++11

template< class R, class... Args >
void swap( function<R(Args...)> &lhs, function<R(Args...)> &rhs );

Parameters

lhs, rhs − It is a polymorphic function wrappers whose states to swap.

Return Value

none

Exceptions

none

functional.htm
Advertisements