I came across this code and I can not make sense of it.
RegisterCallback(MgrTsk::NAME,
[=](uint16_t cmd, uint16_t value, uint32_t size, void* pData) -> bool {
return MsgFromTsk(cmd, size, pData);
});
The return type of MsgFromTsk
is bool
. The API for RegisterCallback
is -
template<typename F>
void RegisterCallback(const char* procName, F msgCallback)
This probably might be a simple question, but even after a lot of google-ing I couldn't understand the syntax.