|
typedef void (* PAdsNotificationFuncExConst)(const AmsAddr* pAddr, const AdsNotificationHeader* pNotification, |
The current callback typedef is a bit "stiff". I have to provide a static method (correct me if I'm wrong) or a lambda with nothing piped in. If I pipe anything into the callback lambda, I get compiler errors.
If it was replaced with std::function it would be more flexible. I could use non-static methods or lambdas where I can pipe data into it.
The new suggested callback typedef would then be:
typedef std::function<void(const AmsAddr* pAddr, const AdsNotificationHeader* pNotification, uint32_t hUser)> PAdsNotificationFuncExConst;
ADS/AdsLib/AdsNotificationOOI.h
Line 5 in 0e0f73f
The current callback typedef is a bit "stiff". I have to provide a static method (correct me if I'm wrong) or a lambda with nothing piped in. If I pipe anything into the callback lambda, I get compiler errors.
If it was replaced with std::function it would be more flexible. I could use non-static methods or lambdas where I can pipe data into it.
The new suggested callback typedef would then be:
typedef std::function<void(const AmsAddr* pAddr, const AdsNotificationHeader* pNotification, uint32_t hUser)> PAdsNotificationFuncExConst;