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 for
The only complication is that
observe()should probably return a handle so that
unobserve()can work. Otherwise, it will be impossible to unobserve in-place lambdas.