libstdc++
Adaptors for pointers to members
Collaboration diagram for Adaptors for pointers to members:

Classes

class  std::const_mem_fun1_ref_t< _Ret, _Tp, _Arg >
 
class  std::const_mem_fun1_t< _Ret, _Tp, _Arg >
 
class  std::const_mem_fun_ref_t< _Ret, _Tp >
 
class  std::const_mem_fun_t< _Ret, _Tp >
 
class  std::mem_fun1_ref_t< _Ret, _Tp, _Arg >
 
class  std::mem_fun1_t< _Ret, _Tp, _Arg >
 
class  std::mem_fun_ref_t< _Ret, _Tp >
 
class  std::mem_fun_t< _Ret, _Tp >
 

Functions

template<typename _Ret , typename _Tp >
mem_fun_t< _Ret, _Tp > std::mem_fun (_Ret(_Tp::*__f)())
 
template<typename _Ret , typename _Tp , typename _Arg >
mem_fun1_t< _Ret, _Tp, _Arg > std::mem_fun (_Ret(_Tp::*__f)(_Arg))
 
template<typename _Ret , typename _Tp >
mem_fun_ref_t< _Ret, _Tp > std::mem_fun_ref (_Ret(_Tp::*__f)())
 
template<typename _Ret , typename _Tp , typename _Arg >
mem_fun1_ref_t< _Ret, _Tp, _Arg > std::mem_fun_ref (_Ret(_Tp::*__f)(_Arg))
 

Detailed Description

There are a total of 8 = 2^3 function objects in this family. (1) Member functions taking no arguments vs member functions taking one argument. (2) Call through pointer vs call through reference. (3) Const vs non-const member function.

All of this complexity is in the function objects themselves. You can ignore it by using the helper function mem_fun and mem_fun_ref, which create whichever type of adaptor is appropriate.

Deprecated:
Deprecated in C++11, no longer in the standard since C++17. Use mem_fn instead.

Function Documentation

◆ mem_fun() [1/2]

template<typename _Ret , typename _Tp >
mem_fun_t< _Ret, _Tp > std::mem_fun ( _Ret(_Tp::*)()  __f)
inline

Definition at line 1362 of file stl_function.h.

◆ mem_fun() [2/2]

template<typename _Ret , typename _Tp , typename _Arg >
mem_fun1_t< _Ret, _Tp, _Arg > std::mem_fun ( _Ret(_Tp::*)(_Arg)  __f)
inline

Definition at line 1382 of file stl_function.h.

◆ mem_fun_ref() [1/2]

template<typename _Ret , typename _Tp >
mem_fun_ref_t< _Ret, _Tp > std::mem_fun_ref ( _Ret(_Tp::*)()  __f)
inline

Definition at line 1372 of file stl_function.h.

◆ mem_fun_ref() [2/2]

template<typename _Ret , typename _Tp , typename _Arg >
mem_fun1_ref_t< _Ret, _Tp, _Arg > std::mem_fun_ref ( _Ret(_Tp::*)(_Arg)  __f)
inline

Definition at line 1392 of file stl_function.h.