64,691
社区成员
发帖
与我相关
我的任务
分享
正解:
template<typename R, typename... ARG>
bool isEqual(const std::function<R(ARG...)>& a, const std::function<R(ARG...)>& b){
typedef R(FuncType)(ARG...);
return a.target_type().name() == b.target_type().name() && a.template target<FuncType*>() == b.template target<FuncType*>();
}