std::swap(std::function) (3) - Linux Manuals

std::swap(std::function): std::swap(std::function)

NAME

std::swap(std::function) - std::swap(std::function)

Synopsis


template< class R, class... Args > (since C++11)
void swap( function<R(Args...)> &lhs, function<R(Args...)> &rhs ); (until C++17)
template< class R, class... Args > (since C++17)
void swap( function<R(Args...)> &lhs, function<R(Args...)> &rhs ) noexcept;


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

Parameters


lhs, rhs - polymorphic function wrappers whose states to swap

Return value


(none)

Example


 This section is incomplete
 Reason: no example

See also


     swaps the contents
swap (public member function)