c++标准不支持模板函数指针,比如:
[cpp]
template
typedef int (* Func) (constType& type);//提示编译错误
不过我们可以这样写:
[cpp]
template
class CAggCalculator {
private:
typedef bool (CAggCalculator::* AggFuncT) (CColumnSeg
typename CAggCalculator
.....
};
这样我们就得到一个指向 bool xxx(CColumnSeg& columnSeg,RESULT_TYPE& result);类型的模板类成员函数了