std::experimental::function<R(Args...)>::operator= (3) - Linux Manuals
std::experimental::function<R(Args...)>::operator=: std::experimental::function<R(Args...)>::operator=
Command to display std::experimental::function<R(Args...)>::operator=
manual in Linux: $ man 3 std::experimental::function<R(Args...)>::operator=
NAME
std::experimental::function<R(Args...)>::operator= - std::experimental::function<R(Args...)>::operator=
Synopsis
function& operator=( const function& other ); (1) (library fundamentals TS)
function& operator=( function&& other ); (2) (library fundamentals TS)
function& operator=( std::nullptr_t ) noexcept; (3) (library fundamentals TS)
template< class F > (4) (library fundamentals TS)
function& operator=( F&& f );
template< class F > (5) (library fundamentals TS)
function& operator=( std::reference_wrapper<F> f );
Assigns a new target to std::experimental::function. In the description below, let ALLOCATOR_OF(f) be the allocator specified in the construction of f, or the value of std::experimental::pmr::get_default_resource() at the time of construction if no allocator was specified.
1) Assigns a copy of target of other, as if by executing function(std::allocator_arg, ALLOCATOR_OF(*this), other).swap(*this);
2) Moves the target of other to *this, as if by executing function(std::allocator_arg, ALLOCATOR_OF(*this), std::move(other)).swap(*this);. other is in a valid state with an unspecified value.
3) Destroys the target of *this. *this is empty after the call. The memory resource returned by get_memory_resource() after the assignment is equivalent to the memory resource before the assignment, but the address may change.
4) Sets the target of *this to the callable f, as if by executing function(std::allocator_arg, ALLOCATOR_OF(*this),std::forward<F>(f)).swap(*this);. This operator does not participate in overload resolution unless f is Callable for argument types Args... and return type R.
5) Sets the target of *this to a copy of f, as if by executing function(std::allocator_arg, ALLOCATOR_OF(*this), f).swap(*this);
Parameters
other - another std::experimental::function object to copy or move from
f - a callable to initialize the target with
Type requirements
-
F must meet the requirements of Callable.
Return value
*this
Exceptions
1-2,4-5) (none)
Pages related to std::experimental::function<R(Args...)>::operator=
- std::experimental::function<R(Args...)>::function (3) - std::experimental::function<R(Args...)>::function
- std::experimental::function<R(Args...)>::get_memory_resource (3) - std::experimental::function<R(Args...)>::get_memory_resource
- std::experimental::function<R(Args...)>::swap (3) - std::experimental::function<R(Args...)>::swap
- std::experimental::function (3) - std::experimental::function
- std::experimental::future (3) - std::experimental::future
- std::experimental::future<T>::future (3) - std::experimental::future<T>::future
- std::experimental::future<T>::is_ready (3) - std::experimental::future<T>::is_ready
- std::experimental::future<T>::operator= (3) - std::experimental::future<T>::operator=
- std::experimental::future<T>::then (3) - std::experimental::future<T>::then
- std::experimental::filesystem::absolute,std::experimental::filesystem::system_complete (3) - std::experimental::filesystem::absolute,std::experimental::filesystem::system_complete
- std::experimental::filesystem::begin(directory_iterator), (3) - std::experimental::filesystem::begin(directory_iterator),
- std::experimental::filesystem::begin(directory_iterator),std::experimental::filesystem::end(directory_iterator) (3) - std::experimental::filesystem::begin(directory_iterator),std::experimental::filesystem::end(directory_iterator)
- std::experimental::filesystem::begin(recursive_directory_iterator), (3) - std::experimental::filesystem::begin(recursive_directory_iterator),
- std::experimental::filesystem::begin(recursive_directory_iterator),std::experimental::filesystem::end(recursive_directory_iterator) (3) - std::experimental::filesystem::begin(recursive_directory_iterator),std::experimental::filesystem::end(recursive_directory_iterator)
- std::experimental::filesystem::canonical (3) - std::experimental::filesystem::canonical
- std::experimental::filesystem::copy (3) - std::experimental::filesystem::copy
- std::experimental::filesystem::copy_file (3) - std::experimental::filesystem::copy_file
- std::experimental::filesystem::copy_options (3) - std::experimental::filesystem::copy_options
- std::experimental::filesystem::copy_symlink (3) - std::experimental::filesystem::copy_symlink
- std::experimental::filesystem::create_directory, (3) - std::experimental::filesystem::create_directory,
- std::experimental::filesystem::create_directory,std::experimental::filesystem::create_directories (3) - std::experimental::filesystem::create_directory,std::experimental::filesystem::create_directories
- std::experimental::filesystem::create_hard_link (3) - std::experimental::filesystem::create_hard_link
- std::experimental::filesystem::create_symlink, (3) - std::experimental::filesystem::create_symlink,
- std::experimental::filesystem::create_symlink,std::experimental::filesystem::create_directory_symlink (3) - std::experimental::filesystem::create_symlink,std::experimental::filesystem::create_directory_symlink