std::mem_fu...t_mem_fun1_t(3)
π NAME π
okay so bestie, welcome to the C++ Standard Libary manual page for std::mem_fu...t_mem_fun1_t(3) β yes the title is doing that abbreviated thing, iconic. π
std::mem_fun_t,std::mem_fun1_t,std::const_mem_fun_t,std::const_mem_fun1_tβstd::mem_fun_t,std::mem_fun1_t,std::const_mem_fun_t,std::const_mem_fun1_t
β¨ Synopsis β¨
Defined in header <functional>
template< class S, class T >
class mem_fun_t : public unary_function<T*,S> {
public: (1)
(deprecated in C++11)
explicit mem_fun_t(S (T::*p)());
(removed in C++17)
S operator()(T* p) const;
};
template< class S, class T >
class const_mem_fun_t : public unary_function<const T*,S>
{
(deprecated in C++11)
public: (2)
(removed in C++17)
explicit const_mem_fun_t(S (T::*p)() const);
S operator()(const T* p) const;
};
template< class S, class T, class A >
class mem_fun1_t : public binary_function<T*,A,S> {
public: (3)
(deprecated in C++11)
explicit mem_fun1_t(S (T::*p)(A));
(removed in C++17)
S operator()(T* p, A x) const;
};
template< class S, class T, class A >
class const_mem_fun1_t : public binary_function<const
T*,A,S> {
(deprecated in C++11)
public: (4)
(removed in C++17)
explicit const_mem_fun1_t(S (T::*p)(A) const);
S operator()(const T* p, A x) const;
};
okay so the whole concept? Wrapper around a member function pointer. The class instance whose member function you're calling gets passed as a pointer to the operator(). That's the vibe. π¦
- Wraps a
non-constmember function with no parameters. - Wraps a
constmember function with no parameters. - Wraps a
non-constmember function with a single parameter. - Wraps a
constmember function with a single parameter.
π«Ά See also π«Ά
mem_funβ creates a wrapper from a pointer to member function, callable with a pointer to object. It's a function template, and it's deprecated in C++11, removed in C++17. πmem_fun_ref_t,mem_fun1_ref_t,const_mem_fun_ref_t,const_mem_fun1_ref_tβ wrapper for a pointer to nullary or unary member function, callable with a reference to object. It's a class template, and it's deprecated in C++11, removed in C++17. πΈ
and that's the page, bestie! π Footer tea: source http://cppreference.com, date 2024.06.10, and the footer tag is std::mem_fu...t_mem_fun1_t(3). mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms