operator callbacks: convert from function pointers to std::functions
From !895 (merged):
we have moved to c++11 since this was written. We should probably switch to
using Callback = std::function<int(EventType, OperatorPtr)>
instead of this typedef. Similarly forCallbackWithResult
below.
The only complication is that
observe()
should probably return a handle so thatunobserve()
can work. Otherwise, it will be impossible to unobserve in-place lambdas.