命名空间
变体
操作

std::copyable_function::swap

来自 cppreference.cn
 
 
 
函数对象
函数调用
(C++17)(C++23)
恒等函数对象
(C++20)
透明运算符包装器
(C++14)
(C++14)
(C++14)
(C++14)  
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)

旧式绑定器和适配器
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)  
(直到 C++17*)
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
(直到 C++17*)(直到 C++17*)
(直到 C++17*)(直到 C++17*)

(直到 C++17*)
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
 
 
void swap( copyable_function& other ) noexcept;
(自 C++26 起)

交换 *this 和 other 中存储的可调用对象。

[编辑] 参数

other - 用于交换存储的可调用对象的函数包装器

[编辑] 返回值

(无)

[编辑] 参见

交换内容
(std::function<R(Args...)> 的公有成员函数) [编辑]
交换两个 std::move_only_function 对象的目标
(std::move_only_function 的公有成员函数) [编辑]