Namespaces
Variants
Actions

std::function<R(Args...)>::assign

From cppreference.com
< cpp‎ | utility‎ | functional‎ | function
 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)  
(C++20)
(C++20)
(C++14)
(C++11)
(C++11)
(C++23)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)


 
Function objects
(C++17)(C++23)
Identity function object
(C++20)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)  
(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
(until C++17*)(until C++17*)
(until C++17*)(until C++17*)

(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
 
 
template< class F, class Alloc >
void assign( F&& f, const Alloc& alloc );
(since C++11)
(removed in C++17)

Initializes the target with f. The alloc is used to allocate memory for any internal data structures that the function might use.

Equivalent to function(std::allocator_arg, alloc, std::forward <F>(f)).swap(*this);.

[edit] Parameters

f - callable function to initialize the target with
alloc - allocator to use to allocate memory for the internal data structures

[edit] Return value

(none)

[edit] Exceptions

May throw implementation-defined exceptions.

[edit] See also

assigns a new target
(public member function) [edit]
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/function/assign&oldid=134337"

AltStyle によって変換されたページ (->オリジナル) /