Class const_mem_fun1_t
Synopsis
#include <include/EASTL/functional.h>
template <typename Result, typename T, typename Argument>
class const_mem_fun1_t : public binary_function<const T*, Argument, Result>
Description
Const member function with one argument. Note that we inherit from unary_function<const T*, Result> instead of what the C++ standard specifies: unary_function<T*, Result>. The C++ standard is in error and this has been recognized by the defect group.
Inheritance
Ancestors: binary_function
Methods
const_mem_fun1_t | ||
operator() |
Source
Lines 744-763 in include/EASTL/functional.h.
template <typename Result, typename T, typename Argument>
class const_mem_fun1_t : public binary_function<const T*, Argument, Result>
{
public:
typedef Result (T::*MemberFunction)(Argument) const;
inline explicit const_mem_fun1_t(MemberFunction pMemberFunction)
: mpMemberFunction(pMemberFunction)
{
// Empty
}
inline Result operator()(const T* pT, Argument arg) const
{
return (pT->*mpMemberFunction)(arg);
}
protected:
MemberFunction mpMemberFunction;
};