名前空間
変種
操作

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

提供: cppreference.com
< cpp‎ | utility‎ | functional
 
 
ユーティリティライブラリ
汎用ユーティリティ
日付と時間
関数オブジェクト
書式化ライブラリ (C++20)
(C++11)
関係演算子 (C++20で非推奨)
整数比較関数
(C++20)
スワップと型操作
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
一般的な語彙の型
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

初等文字列変換
(C++17)
(C++17)
 
関数オブジェクト
関数ラッパー
(C++11)
(C++11)
関数の部分適用
(C++20)
(C++11)
関数呼び出し
(C++17)
恒等関数オブジェクト
(C++20)
参照ラッパー
(C++11)(C++11)
演算子ラッパー
否定子
(C++17)
検索子
制約付き比較子
古いバインダとアダプタ
(C++17未満)
(C++17未満)
(C++17未満)
(C++17未満)
mem_fun_tmem_fun1_tconst_mem_fun_tconst_mem_fun1_t
(C++17未満)(C++17未満)(C++17未満)(C++17未満)
(C++20未満)
(C++20未満)
(C++17未満)(C++17未満)
(C++17未満)(C++17未満)

(C++17未満)
(C++17未満)(C++17未満)(C++17未満)(C++17未満)
(C++20未満)
(C++20未満)
 
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 Arg >

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) 引数を1つ取る非 const メンバ関数をラップします。
4) 引数を1つ取る const メンバ関数をラップします。

[編集] 関連項目

(C++11で非推奨)(C++17で削除)
メンバ関数ポインタから、オブジェクトへのポインタを使用して呼ぶことができるラッパーを作成します
(関数テンプレート) [edit]
オブジェクトへの参照を使用して呼ぶことができる、引数なしまたは引数1個のメンバ関数へのポインタに対するラッパー
(クラステンプレート) [edit]