cppreference.com
搜索
创建账户
登录
名字空间
页面
讨论
变换
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
查看
查看
编辑
历史
操作
std::function::
swap
来自cppreference.com
<
cpp
|
utility
|
functional
|
function
C++
语言
标准库头文件
概念
工具库
字符串库
容器库
算法库
迭代器库
数值库
输入/输出库
本地化库
正则表达式库
(C++11)
原子操作库
(C++11)
线程支持库
(C++11)
文件系统库
(C++17)
技术规范
[编辑]
工具库
类型支持
(基本类型、 RTTI 、类型特性)
动态内存管理
错误处理
程序工具
变参数函数
日期和时间
函数对象
initializer_list
(C++11)
bitset
hash
(C++11)
关系运算符
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
optional
、
any
与
variant
(C++17)
optional
any
variant
in_place
in_place_type
in_place_index
in_place_t
in_place_type_t
in_place_index_t
pair 与 tuple
pair
tuple
(C++11)
apply
(C++17)
make_from_tuple
(C++17)
piecewise_construct_t
(C++11)
piecewise_construct
(C++11)
integer_sequence
(C++14)
swap 、 forward 与 move
swap
exchange
(C++14)
forward
(C++11)
move
(C++11)
move_if_noexcept
(C++11)
初等字符串转换
to_chars
(C++17)
from_chars
(C++17)
chars_format
(C++17)
类型运算
declval
(C++11)
as_const
(C++17)
[编辑]
函数对象
函数包装
function
(C++11)
mem_fn
(C++11)
bad_function_call
(C++11)
invoke
(C++17)
绑定
bind
(C++11)
is_bind_expression
(C++11)
is_placeholder
(C++11)
_1, _2, _3, ...
(C++11)
引用包装
reference_wrapper
(C++11)
ref
cref
(C++11)
(C++11)
运算符包装
plus
minus
negate
multiplies
divides
modulus
logical_and
logical_or
logical_not
equal_to
not_equal_to
greater
less
greater_equal
less_equal
bit_and
bit_or
bit_xor
bit_not
(C++14)
取反器
not_fn
not1
(弃用)
not2
(弃用)
unary_negate
(弃用)
binary_negate
(弃用)
搜索器
default_searcher
(C++17)
boyer_moore_searcher
(C++17)
boyer_moore_horspool_searcher
(C++17)
旧绑定器与适配器
unary_function
(C++17 前)
binary_function
(C++17 前)
ptr_fun
(C++17 前)
pointer_to_unary_function
(C++17 前)
pointer_to_binary_function
(C++17 前)
mem_fun
(C++17 前)
mem_fun_t
mem_fun1_t
const_mem_fun_t
const_mem_fun1_t
(C++17 前)
(C++17 前)
(C++17 前)
(C++17 前)
binder1st
binder2nd
(C++17 前)
(C++17 前)
bind1st
bind2nd
(C++17 前)
(C++17 前)
mem_fun_ref
(C++17 前)
mem_fun_ref_t
mem_fun1_ref_t
const_mem_fun_ref_t
const_mem_fun1_ref_t
(C++17 前)
(C++17 前)
(C++17 前)
(C++17 前)
[编辑]
std::function
成员函数
function::function
function::~function
function::operator=
function::swap
function::assign
(C++17 前)
function::operator bool
function::operator()
function::target_type
function::target
非成员函数
operator==
operator!=
std::swap(std::function)
帮助类
std::uses_allocator<std::function>
(C++17 前)
推导指引
(C++17)
[编辑]
void
swap
(
function
&
other
)
noexcept
;
(C++11 起)
交换
*
this
与
other
存储的可调用对象。
[
编辑
]
参数
other
-
要与之互换存储可调用对象的函数包装器
[
编辑
]
返回值
(无)