编写代码遇到下面这个问题。
有这样一个函数
static CallFuncN * create(const std::function<void(Node*)>& func);
用以下方式调用调用
CallFuncN::create(CC_CALLBACK_1(GameObjMap::releaseElementToPool, s1));
显示的错误信息为No matching function for call to “create”
调用相关信息如下。
#define CC_CALLBACK_1(selector,target, …) std::bind(&selector,target, std::placeholders::_1, ##VA_ARGS)
void GameObjMap::releaseElementToPool(Node* n);
s1 是Sprite*类型
继承关系为class Sprite : public Node, public TextureProtocol
c++学得不精,感觉作为Node的子类应该可以作为参数的,不知道哪想错了,求大神帮助。
