Namespaces
Variants

std::experimental:: function

From cppreference.net
헤더 파일에 정의됨 <experimental/functional>
template < class >
class function ; /* undefined */
(라이브러리 fundamentals TS)
template < class R, class ... Args >
class function < R ( Args... ) >
(라이브러리 fundamentals TS)

std::experimental::function 는 타입 삭제된 할당자를 지원하는 std::function 의 수정된 버전입니다.

목차

멤버 타입

유형 정의
allocator_type

std::experimental::erased_type

(라이브러리 펀더멘털 TS)
(라이브러리 펀더멘털 TS v3 이전)

std:: pmr :: polymorphic_allocator <>

(라이브러리 펀더멘털 TS v3)

멤버 함수

새로운 std::experimental::function 인스턴스를 생성함
(public member function)
새로운 대상을 할당함
(public member function)
내용을 교환함
(public member function)
(removed in library fundamentals TS v3)
이 객체가 메모리를 할당하는 데 사용하는 메모리 리소스에 대한 포인터를 검색함
(public member function)
(library fundamentals TS v3)
이 객체가 메모리를 할당하는 데 사용하는 타입 삭제된 std::pmr::polymorphic_allocator 을 검색함
(public member function)

비멤버 함수

swap 알고리즘을 특수화합니다
(함수 템플릿)
(라이브러리 fundamentals TS v3에서 제거됨)
std::experimental::function nullptr 을 비교합니다
(함수 템플릿)

헬퍼 클래스

(라이브러리 fundamentals TS v3에서 제거됨)
std::uses_allocator 타입 특성의 특수화
(클래스 템플릿 특수화)

std:: function과 동일한 멤버

멤버 타입

타입 정의
result_type R
Library Fundamental TS v3에서 제거된 멤버 타입
argument_type T if sizeof... ( Args ) == 1 and T is the first and only type in Args...
first_argument_type T1 if sizeof... ( Args ) == 2 and T1 is the first of the two types in Args...
second_argument_type T2 if sizeof... ( Args ) == 2 and T2 is the second of the two types in Args...

멤버 타입 argument_type , first_argument_type , 그리고 second_argument_type 은 제거되었습니다. 이는 해당하는 std::function 의 멤버 타입들이 C++20에서 제거되었기 때문입니다.

(library fundamentals TS v3)

멤버 함수

std::function 인스턴스를 파괴함
( std::function<R(Args...)> 의 public 멤버 함수)
대상이 포함되어 있는지 확인함
( std::function<R(Args...)> 의 public 멤버 함수)
대상을 호출함
( std::function<R(Args...)> 의 public 멤버 함수)
대상 접근
저장된 대상의 typeid 를 얻음
( std::function<R(Args...)> 의 public 멤버 함수)
저장된 대상에 대한 포인터를 얻음
( std::function<R(Args...)> 의 public 멤버 함수)