std::mem_fun_t, std::mem_fun1_t, std::const_mem_fun_t, std::const_mem_fun1_t
From cppreference.com
< cpp | utility | functional
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Utilities library
Type support (basic types, RTTI)
Library feature-test macros (C++20)
(C++11)
(C++20)
(C++26)
(C++20)
Coroutine support (C++20)
Contract support (C++26)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
Relational operators (deprecated in C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
(C++20)
Swap and type operations
Common vocabulary types
Function objects
(C++11)
(C++23)
(C++26)
(C++26)
(C++11)
(C++11)
(C++20)(C++23)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)
(C++20)(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++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++17)
(C++17)
(C++17)
(C++17)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
mem_fun_tmem_fun1_tconst_mem_fun_tconst_mem_fun1_t
(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*)
(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 >
(1)
(deprecated in C++11) class mem_fun_t : public unary_function<T*,S> {
public:
explicit mem_fun_t(S (T::*p)());
S operator()(T* p) const;
(removed in C++17)
template< class S, class T >
(2)
(deprecated in C++11) 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;
(removed in C++17)
template< class S, class T, class A >
(3)
(deprecated in C++11) 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;
(removed in C++17)
template< class S, class T, class A >
(4)
(deprecated in C++11) 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;
(removed in C++17)
Wrapper around a member function pointer. The class instance whose member function to call is passed as a pointer 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)
(function template) [edit]
(deprecated in C++11)(removed in C++17)
(class template) [edit]