-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This would have been so convenient, but alas C++ doesn't allow us to convert from lambdas to function pointers. Error we get: Core/ClientSML/src/sml_ClientKernel.cpp:2225:45: error: no viable conversion from '(lambda at Core/ClientSML/src/sml_ClientKernel.cpp:2194:23)' to 'sml::RhsEventHandler' (aka 'const char *(*)(sml::smlRhsEventId, void *, sml::Agent *, const char *, const char *, int *, char *)') return AddRhsFunction(pRhsFunctionName, newHandler, pUserData, addToBack); ^~~~~~~~~~ Core/ClientSML/src/sml_ClientKernel.cpp:2185:74: note: passing argument to parameter 'handler' here int Kernel::AddRhsFunction(char const* pRhsFunctionName, RhsEventHandler handler, void* pUserData, bool addToBack) ^ 1 error generated. See https://stackoverflow.com/questions/28746744/passing-capturing-lambda-as-function-pointer.
- Loading branch information
1 parent
5b73b5b
commit b068747
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters