【发布时间】:2015-11-06 19:55:34
【问题描述】:
我正在尝试存储指向成员函数的指针。需要存储指针的类声明为:
template <typename TDataType, typename T>
bool my_function(std::string topic_name,
void(T::*)(const TDataType&) fp,
T* obj)
我得到错误:
error: expected ',' or '...' before 'fp'
void(T::*)(const TDataType&) fp,
谁能告诉我发生了什么事?看起来这是我没有得到的语法错误。
【问题讨论】:
标签: c++ pointers member-function-pointers