-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
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
function message bus,注册的函数无法支持引用和指针类型 #25
Comments
谢谢你发现的bug,我后面看看是什么原因。 |
已经修复了bug,具体原因是因为对于返回类型的函数调用的时候没有加返回类型。现在内部做了判空处理,对于这种情况会忽略返回值。 |
支持引用和指针,这是测试代码:
|
@xiaolanpingguo 还有新的问题吗? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
用法是这样的:
struct person {
std::string foo(const int& a) {
return std::to_string(a);
}
};
int main()
{
auto& bus = FunctionMsgBus::get();
}
会引起崩溃
然后查了下问题,发现如果函数参数是引用的话,会编译不过,如果函数参数是指针的话,同样会引起崩溃
The text was updated successfully, but these errors were encountered: