I am developing a class that needs to store a call back function. So it needs to include a pointer to some “functor” object and a method to initialize this pointer;
My first question is what type should Funct_t be. Conceptually, the signature of the call back function is void(void) but is there a way to define Funct_t generically so that the callBackptr can be set to point to an actually function, a static class method or a lambda expression or anything else that is callable ? Include a lambda with non-empty capture ? (one solution I see is to template Thing and make of Funct_t a template argument but I hope there is a simpler approach.)
More generally, I am wondering if/how pointers to objects such as …