std::function<R(Args...)>:: assign
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 ) ; |
(C++11부터)
(C++17에서 제거됨) |
|
target
을
f
로 초기화합니다.
alloc
은
function
이 사용할 수 있는
내부 데이터 구조를 위한 메모리를 할당하는 데 사용됩니다.
다음과 동일함 function ( std:: allocator_arg , alloc, std:: forward < F > ( f ) ) . swap ( * this ) ; .
목차 |
매개변수
| f | - | target 을 초기화하기 위해 호출할 함수 |
| alloc | - | 내부 데이터 구조에 대한 메모리를 할당하는 데 사용할 할당자 |
반환값
(없음)
예외
구현 정의 예외를 던질 수 있습니다.
참고 항목
|
새로운 대상을 할당
(public member function) |