다음을 통해 공유


function::assign

Assigns a callable object to this function object.

template<class Fx, class Alloc>
    void assign(
        Fx _Func, 
        const Alloc& _Ax
);
template<class Fx, class Alloc>
    void assign(
        reference_wrapper<Fx> _Fnref, 
        const Alloc& _Ax
);

매개 변수

  • _Func
    A callable object.

  • _Fnref
    A reference wrapper that contains a callable object.

  • _Ax
    An allocator object.

설명

The member functions each replace the callable object held by *this with the callable object passed as the operand. Both allocate storage with the allocator object _Ax.

요구 사항

헤더: <기능>

네임스페이스: std

참고 항목

참조

function 클래스

mem_fn 함수

Lvalue 및 Rvalue

reference_wrapper 클래스