C++ Functional Library - assign


Advertisements

Description

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

Declaration

Following is the declaration for std::function::assign.

C++11

template< class F, class Alloc >

C++17

void assign( F&& f, const Alloc& alloc );

Parameters

  • other − This function object used to initialize *this.

  • f − a callable used to initialize *this.

Return Value

none

Exceptions

none

functional.htm
Advertisements