Functor --- 仿函数

仿函数(functors)在C++标准中采用的名称是函数对象(function objects),实际上就是函数对象,所谓函数对象就是具有函数性质的对象。仿函数主要用于STL中的算法中。

structObjectEqualFunctor {

booloperator()(const__unsafe_unretainedidleft,

const__unsafe_unretainedidright)const{

returnleft == right;

}

};

(未完待续)

你可能感兴趣的:(Functor --- 仿函数)