Technical Specification | ||||
Filesystem library(filesystem TS) | ||||
Library fundamentals(library fundamentals TS) | ||||
Library fundamentals 2(library fundamentals TS v2) | ||||
Library fundamentals 3(library fundamentals TS v3) | ||||
Extensions for parallelism(parallelism TS) | ||||
Extensions for parallelism 2(parallelism TS v2) | ||||
Extensions for concurrency(concurrency TS) | ||||
Extensions for concurrency 2(concurrency TS v2) | ||||
Concepts(concepts TS) | ||||
Ranges(ranges TS) | ||||
Reflection(reflection TS) | ||||
Mathematical special functions(special functions TR) | ||||
Experimental Non-TS | ||||
Pattern Matching | ||||
Linear Algebra | ||||
std::execution | ||||
Contracts | ||||
2D Graphics |
Convenience aliases for containers usingpolymorphic_allocator | ||||
Memory resource classes | ||||
Global memory resources | ||||
Type-erased allocator support for existing classes | ||||
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> function& operator=( F&& f); | (4) | (library fundamentals TS) |
(5) | ||
template<class F> function& operator=(std::reference_wrapper<F> f); | (library fundamentals TS) | |
template<class F> function& operator=(std::reference_wrapper<F> f)noexcept; | (library fundamentals TS v3) | |
Assigns a newtarget tostd::experimental::function
. In the description below, letALLOCATOR_OF(f) be the allocator specified in the construction off, orthe value ofstd::experimental::pmr::get_default_resource()(until library fundamentals TS v3)the default-constructedstd::pmr::polymorphic_allocator<> value(library fundamentals TS v3) at the time of construction if no allocator was specified.
get_memory_resource()
after the assignment is equivalent to the memory resource before the assignment, but the address may change.Args...
and return typeR
.Contents |
other | - | anotherstd::experimental::function object to copy or move from |
f | - | a callable to initialize thetarget with |
Type requirements | ||
-F must meet the requirements ofCallable. |
*this
The move assignment operator may need to allocate storage ifget_memory_resource()!= other.get_memory_resource()(until library fundamentals TS v3)get_allocator()!= other.get_allocator()(library fundamentals TS v3)