std::mem_fun_t, std::mem_fun1_t, std::const_mem_fun_t, std::const_mem_fun1_t
ja.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) 引数が1つの非constメンバ関数をラップする。
4) 引数が1つのconstメンバ関数をラップする。
関連項目
|
(deprecated in C++11)
(removed in C++17)
|
オブジェクトへのポインタで呼び出し可能な、メンバ関数へのポインタからのラッパーを作成する
(関数テンプレート) |
|
(deprecated in C++11)
(removed in C++17)
|
オブジェクトへの参照で呼び出し可能な、引数なしまたは単項メンバ関数へのポインタのラッパー
(クラステンプレート) |