const_mem_fun1_ref_t Class

允许 const 成员函数采用一个二进制函数对象将调用的单个参数,当初始化引用参数的适配器选件类。

template<class Result, class Type, class Arg>
   class const_mem_fun1_ref_t
      : public binary_function<Type, Arg, Result> {
   explicit const_mem_fun1_ref_t( Result (Type::*_Pm )( Arg ) const );
   Result operator()(
      const Type& _Left,
      Arg _Right
   ) const;
   };

参数

  • _Pm
    为选件类要转换的 *** 类型 *** 的成员函数的指针转换为函数对象。

  • _Left
    const 对象 _Pm 成员函数调用。

  • _Right
    提供 _Pm的参数。

返回值

一个灵活的二进制功能。

备注

模板选件类中的私有成员对象存储 _Pm的副本,必须是指向选件类 ***** 类型 *****的成员函数,。 它定义其成员函数 operator() 成返回(_Left。* _Pm) (_Right) const

示例

不直接通常使用 const_mem_fun1_ref_t 构造函数;helper函数 mem_fun_ref 用于满足成员函数。 请参见 mem_fun_ref 有关如何使用成员函数适配器的示例。

要求

标头: <functional>

命名空间: std

请参见

参考

线程安全性对标准C++库中

标准模板库