|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
function::assign (until C++17) | ||||
| Non-member functions | ||||
(until C++20) | ||||
| Helper classes | ||||
(until C++17) | ||||
| Deduction guides(C++17) |
template<class F,class Alloc> void assign( F&& f,const Alloc& alloc); | (since C++11) (removed in C++17) | |
Initializes thetarget withf. Thealloc is used to allocate memory for any internal data structures that thefunction might use.
Equivalent tofunction(std::allocator_arg, alloc,std::forward<F>(f)).swap(*this);.
Contents |
| f | - | callable function to initialize thetarget with |
| alloc | - | allocator to use to allocate memory for the internal data structures |
(none)
May throw implementation-defined exceptions.
| assigns a new target (public member function)[edit] |