std::mem_fun_t, std::mem_fun1_t, std::const_mem_fun_t, std::const_mem_fun1_t
cppreference.net에서 가져옴
| 헤더 <functional>
|
||
template< class S, class T >
class mem_fun_t : public unary_function<T*,S> {
public:
explicit mem_fun_t(S (T::*p)());
S operator()(T* p) const;
};
|
에 정의됨 (1) | (C++11에서 폐지됨) (C++17에서 제거됨) |
template< class S, class T >
class const_mem_fun_t : public unary_function<const T*,S> {
public:
explicit const_mem_fun_t(S (T::*p)() const);
S operator()(const T* p) const;
};
|
(2) | (C++11에서 폐지됨) (C++17에서 제거됨) |
template< class S, class T, class A >
class mem_fun1_t : public binary_function<T*,A,S> {
public:
explicit mem_fun1_t(S (T::*p)(A));
S operator()(T* p, A x) const;
};
|
(3) | (C++11에서 폐지됨) (C++17에서 제거됨) |
template< class S, class T, class A >
class const_mem_fun1_t : public binary_function<const T*,A,S> {
public:
explicit const_mem_fun1_t(S (T::*p)(A) const);
S operator()(const T* p, A x) const;
};
|
(4) | (C++11에서 폐지됨) (C++17에서 제거됨) |
멤버 함수 포인터를 감싸는 래퍼입니다. 멤버 함수를 호출할 클래스 인스턴스는 operator()에 대한 포인터로 전달됩니다.
1) 매개변수가 없는 비-const 멤버 함수를 래핑합니다.
2) 매개변수가 없는 const 멤버 함수를 래핑합니다.
3) 단일 매개변수를 가진 비-const 멤버 함수를 래핑합니다.
4) 단일 매개변수를 가진 const 멤버 함수를 래핑합니다.
참고 항목
|
(C++11에서 사용 중단됨)
(C++17에서 제거됨)
|
객체 포인터로 호출 가능한 멤버 함수 포인터에 대한 래퍼 생성
(함수 템플릿) |
|
(C++11에서 사용 중단됨)
(C++17에서 제거됨)
|
객체 참조로 호출 가능한 0항 또는 1항 멤버 함수 포인터에 대한 래퍼
(클래스 템플릿) |