std::mem_fun_ref_t, std::mem_fun1_ref_t, std::const_mem_fun_ref_t, std::const_mem_fun1_ref_t
ja.cppreference.net より
| ヘッダ <functional>
|
||
template< class S, class T >
class mem_fun_ref_t : public unary_function<T,S> {
public:
explicit mem_fun_ref_t(S (T::*p)());
S operator()(T& p) const;
};
|
で定義 (1) | (C++11で非推奨) (C++17で削除) |
template< class S, class T >
class const_mem_fun_ref_t : public unary_function<T,S> {
public:
explicit const_mem_fun_ref_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_ref_t : public binary_function<T,A,S> {
public:
explicit mem_fun1_ref_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_ref_t : public binary_function<T,A,S> {
public:
explicit const_mem_fun1_ref_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で削除)
|
オブジェクトへの参照で呼び出し可能なメンバ関数ポインタからのラッパーを作成する
(関数テンプレート) |
|
(C++11で非推奨)
(C++17で削除)
|
オブジェクトへのポインタで呼び出し可能な、引数なしまたは単項メンバ関数ポインタのラッパー
(クラステンプレート) |