We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为何仅支持静态的成员函数,普通的成员函数为何不支持呢?
The text was updated successfully, but these errors were encountered:
+1 同问,怎么支持普通成员函数。 实际使用时,基本需求的都是普通函数。
Sorry, something went wrong.
找到解决方法了:使用std::mem_fn处理
具体:mem_fn:executor.commit(std::mem_fn(&MMyClass::MMethod),this); MMethod方法就是普通函数。
@lzpong Please Close this Issue!
没看 readme , 有说明的
commit 直接使用只能调用stdcall函数,但有两种方法可以实现调用类成员,一种是使用 bind: .commit(std::bind(&Dog::sayHello, &dog)); 一种是用 mem_fn: .commit(std::mem_fn(&Dog::sayHello), &dog);```
No branches or pull requests
为何仅支持静态的成员函数,普通的成员函数为何不支持呢?
The text was updated successfully, but these errors were encountered: