我正在尝试传递一个类成员函数指针
template < typename CLASS, typename TYPE1, typename TYPE2 >
void WriteFunctionHelper(CLASS* pOwner, PropInfoType::iterator& it, WriterPtr pw, WriterPtr (Writer::*func)(TYPE1, TYPE2) ) {
MemberProperty<CLASS,TYPE2> *ptr = (MemberProperty<CLASS, TYPE2> *)it->second;
const char *propertName = ptr->m_propertyName.c_str();
if ( !ptr->m_getterFn ) {
throw;
}
pw->*func(propertName,(pOwner->*(ptr->m_getterFn))());
}
我收到编译器错误error C2064: term does not evaluate to a function taking 2 arguments
我在做什么错