在线文档教程
C++
应用 | Utilities

std::swap(std::function)

STD::交换%28 std::函数%29

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

重载std::swap算法std::function.交换lhs与...rhs.有效地打电话lhs.swap(rhs)...

参数

lhs, rhs-polymorphic function wrappers whose states to swap

返回值

%280%29

例外

(none)(until C++17)
noexcept specification: noexcept(since C++17)

另见

swapswaps the contents (public member function)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/实用程序/Functional/FunctionalSwap 2