名稱空間
變體
操作

std::mem_fun_ref_t, std::mem_fun1_ref_t, std::const_mem_fun_ref_t, std::const_mem_fun1_ref_t

來自 cppreference.com
 
 
 
函式物件
函式呼叫
(C++17)(C++23)
恆等函式物件
(C++20)
透明運算子包裝器
(C++14)
(C++14)
(C++14)
(C++14)  
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)

舊繫結器和介面卡
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)  
(直到 C++17*)
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
(直到 C++17*)(直到 C++17*)
(直到 C++17*)(直到 C++17*)

(直到 C++17*)
mem_fun_ref_tmem_fun1_ref_tconst_mem_fun_ref_tconst_mem_fun1_ref_t
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
 
定義於標頭檔案 <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) 包裝一個帶單個引數的非 const 成員函式。
4) 包裝一個帶單個引數的 const 成員函式。

[編輯] 參閱

(C++11 中已廢棄)(C++17 中已移除)
從成員函式指標建立包裝器,可使用物件引用呼叫
(函式模板) [編輯]
(C++11 中已廢棄)(C++17 中已移除)
指向無參或一元成員函式的指標的包裝器,可使用物件指標呼叫
(類模板) [編輯]