std::mem_fu...t_mem_fun1_t(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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. πŸ¦‹

  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.

🫢 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