20 General utilities library [utilities]

20.8 Function objects [function.objects]

20.8.10 Function template mem_fn [func.memfn]

template<class R, class T> unspecified mem_fn(R T::* pm); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...)); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) const); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) volatile); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) &); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) const &); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) volatile &); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile &); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) &&); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) const &&); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) volatile &&); template<class R, class T, class... Args> unspecified mem_fn(R (T::* pm)(Args...) const volatile &&);

Returns: A simple call wrapper ([func.def]) fn such that the expression fn(t, a2, ..., aN) is equivalent to INVOKE(pm, t, a2, ..., aN) ([func.require]). fn shall have a nested type result_type that is a synonym for the return type of pm when pm is a pointer to member function.

The simple call wrapper shall define two nested types named argument_type and result_type as synonyms for cv T* and Ret, respectively, when pm is a pointer to member function with cv-qualifier cv and taking no arguments, where Ret is pm's return type.

The simple call wrapper shall define three nested types named first_argument_type, second_argument_type, and result_type as synonyms for cv T*, T1, and Ret, respectively, when pm is a pointer to member function with cv-qualifier cv and taking one argument of type T1, where Ret is pm's return type.

Throws: Nothing.