Namespaces
Variants

std:: mem_fun_t, std:: mem_fun1_t, std:: const_mem_fun_t, std:: const_mem_fun1_t

From cppreference.net
Utilities library
Function objects
Function invocation
(C++17) (C++23)
Identity function object
(C++20)
Old binders and adaptors
( until C++17* )
( until C++17* )
( until C++17* )
( until C++17* )
mem_fun_t mem_fun1_t const_mem_fun_t const_mem_fun1_t
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
( until C++17* ) ( until C++17* )
( until C++17* ) ( until C++17* )

( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
ヘッダーで定義 <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メンバー関数をラップします。

関連項目

(deprecated in C++11) (removed in C++17)
オブジェクトへのポインタで呼び出し可能な、メンバ関数へのポインタからのラッパーを作成する
(関数テンプレート)
オブジェクトへの参照で呼び出し可能な、引数なしまたは単項メンバ関数へのポインタのラッパー
(クラステンプレート)