std::mem_fun_t, std::mem_fun1_t, std::const_mem_fun_t, std::const_mem_fun1_t
提供: cppreference.com
<tbody>
</tbody>
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で削除) |
メンバ関数ポインタから、オブジェクトへのポインタを使用して呼ぶことができるラッパーを作成します (関数テンプレート) |
(C++11で非推奨)(C++17で削除) |
オブジェクトへの参照を使用して呼ぶことができる、引数なしまたは引数1個のメンバ関数へのポインタに対するラッパー (クラステンプレート) |