A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/functional/mem_fun_ref_t/ below:

class template

<functional>

std::mem_fun_ref_t
template <class S, class T> class mem_fun_ref_t;

Generate function object class from parameterless member (reference version)

Generates an unary function object class from a parameterless member of class

T

that returns a value of type

S

.

mem_fun_ref_t is generally used as a type. The function mem_fun_ref (also defined in header <functional>) can be used to directly construct an object of this type.

This class is derived from unary_function and is typically defined as:

1
2
3
4
5
6
7
8
9
template <class S, class T>
  class mem_fun_ref_t : public unary_function <T,S>
{
  S (T::*pmem)();
public:
  explicit mem_fun_ref_t ( S (T::*p)() ) : pmem (p) {}
  S operator() (T& p) const
    { return (p.*pmem)(); }
};


Members
constructor
Constructs an unary function object class from member function p of class T. The return type of this member function shall be type compatible with type S.
S operator() (T& p) const
Member function taking one parameter. The argument expected for it is an object of type T whose member is to be called.

See also
mem_fun_ref
Convert member function to function object (reference version) (function template)
mem_fun1_ref_t
Generate function object class from single-parameter member (reference version) (class template)
unary_function
Unary function object base class (class template)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4