Namespaces
Variants

std::copyable_function::swap

来自 zh.cppreference.net
 
 
 
函数对象
函数调用
(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 的公开成员函数)