Namespaces
Variants
Views
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
 
 
Utilities library
Language support
Type support (basic types, RTTI)
Library feature-test macros (C++20)
Dynamic memory management
Program utilities
Coroutine support (C++20)
Variadic functions
Debugging support
(C++26)
Three-way comparison
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)

 
Function objects
Function invocation
(C++17)(C++23)
Identity function object
(C++20)
Transparent operator wrappers
(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)

Old binders and adaptors
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)  
(until C++17*)
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
(until C++17*)(until C++17*)
(until C++17*)(until C++17*)

(until C++17*)
mem_fun_ref_tmem_fun1_ref_tconst_mem_fun_ref_tconst_mem_fun1_ref_t
(until C++17*)(until C++17*)(until C++17*)(until C++17*)
(until C++20*)
(until C++20*)
 
Defined in header <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 in C++11)
(removed in 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) (deprecated in C++11)
(removed in 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) (deprecated in C++11)
(removed in 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) (deprecated in C++11)
(removed in C++17)

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

(deprecated in C++11)(removed in C++17)
creates a wrapper from a pointer to member function, callable with a reference to object
(function template) [edit]
(deprecated in C++11)(removed in C++17)
wrapper for a pointer to nullary or unary member function, callable with a pointer to object
(class template) [edit]