##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

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

From cppreference.com
< cpp‎ | utility‎ | 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) | (deprecated)
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) | (deprecated)
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) | (deprecated)
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) | (deprecated)

Wrapper around a member function pointer. The class instance whose member function to call is passed as a reference to the `operator()`.

1) Wraps a non-const member function with no parameters.
2) Wraps a const member function with no parameters.
3) Wraps a non-const member function with a single parameter.
4) Wraps a const member function with a single parameter.

### [edit] See also

mem_fun_ref (deprecated) | creates a wrapper from a pointer to member function, callable with a reference to object (function template) [edit]
mem_fun_t mem_fun1_t const_mem_fun_t const_mem_fun1_t (deprecated)(deprecated)(deprecated)(deprecated) | wrapper for a pointer to nullary or unary member function, callable with a pointer to object (class template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/mem_fun_ref_t&oldid=59575"