std::function::
swap
From cppreference.com
<
cpp
|
utility
|
functional
|
function
C++
Language
Standard library headers
Concepts
Utilities library
Strings library
Containers library
Algorithms library
Iterators library
Numerics library
Input/output library
Localizations library
Regular expressions library
(C++11)
Atomic operations library
(C++11)
Thread support library
(C++11)
Technical Specifications
Utilities library
Type support
(basic types, RTTI, type traits)
Dynamic memory management
Error handling
Program utilities
Variadic functions
Date and time
Function objects
initializer_list
(C++11)
bitset
hash
(C++11)
Relational operators
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
Pairs and tuples
pair
tuple
(C++11)
piecewise_construct_t
(C++11)
piecewise_construct
(C++11)
integer_sequence
(C++14)
Swap, forward and move
swap
exchange
(C++14)
forward
(C++11)
move
(C++11)
move_if_noexcept
(C++11)
Type operations
declval
(C++11)
as_const
(C++17)
Function objects
Function wrappers
function
(C++11)
mem_fn
(C++11)
bad_function_call
(C++11)
invoke
(C++17)
Bind
bind
(C++11)
is_bind_expression
(C++11)
is_placeholder
(C++11)
_1, _2, _3, ...
(C++11)
Reference wrappers
reference_wrapper
(C++11)
ref
cref
(C++11)
(C++11)
Operator wrappers
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)
Negators
unary_negate
binary_negate
not1
not2
Deprecated binders and adaptors
unary_function
(until C++17)
binary_function
(until C++17)
ptr_fun
(until C++17)
pointer_to_unary_function
(until C++17)
pointer_to_binary_function
(until C++17)
mem_fun
(until C++17)
mem_fun_t
mem_fun1_t
const_mem_fun_t
const_mem_fun1_t
(until C++17)
(until C++17)
(until C++17)
(until C++17)
mem_fun_ref
(until C++17)
mem_fun_ref_t
mem_fun1_ref_t
const_mem_fun_ref_t
const_mem_fun1_ref_t
(until C++17)
(until C++17)
(until C++17)
(until C++17)
binder1st
binder2nd
(until C++17)
(until C++17)
bind1st
bind2nd
(until C++17)
(until C++17)
std::function
Member functions
function::function
function::~function
function::operator=
function::swap
function::assign
(until C++17)
function::operator bool
function::operator()
function::target_type
function::target
Non-member functions
operator==
operator!=
std::swap(std::function)
Helper classes
std::uses_allocator<std::function>
void
swap
(
function
&
other
)
;
(since C++11)
Exchanges the stored callable objects of
*
this
and
other
.
[
edit
]
Parameters
other
-
function wrapper to exchange the stored callable object with
[
edit
]
Return value
(none)
[
edit
]
Exceptions
noexcept
specification:
noexcept
Category
:
unconditionally noexcept