std::function<R(Args...)>::swap
来自cppreference.com
< cpp | utility | functional | function
工具库
函数对象
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
旧绑定器与适配器 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
std::function
成员函数 | ||||
function::swap
|
||||
(C++17
前)
|
||||
非成员函数 | ||||
(C++20
前)
|
||||
辅助类 | ||||
(C++17
前)
|
||||
推导指引(C++17) |
void
swap(
function&
other )
noexcept;
|
(C++11 起) | |
交换 *this 与
other
存储的可调用对象。
参数
other | - | 要与之互换存储可调用对象的函数包装 |
返回值
(无)
参阅
(C++23)
|
交换二个 std::move_only_function 对象的目标 ( std::move_only_function
的公开成员函数) |