I doubt this is possible, but it’s worth asking: I’d like to call a non-static member function from inside of a static one. I’d like to do it for every current instance of the class. Is it possible?
When I try this in a test class I get the following error:
“cannot call member function ‘void TestClass::NonStaticMethod()’ without an object”
You could do it with some trickery. If you want to keep track of all instances, you have to register the instances at class construction time. This is tricky to get right, of course, but here’s a rough approach:
You’ll have to make sure that all constructors perform the registration.