// ATest.cpp #include "ATest.h" #ifdef TEST_ATEST #include <iostream> class Foo { public: void doFoo() { std::cout << "\n doing Foo"; } }; class Tester : public ATest { bool test() { return true; } }; int main() { Foo foo; Tester tester; tester.safeInvoke(foo, &Foo::doFoo); } #endif