#ifndef TESTING_TOOLS #define TESTING_TOOLS #include struct NoDelete { template void operator()(T*) {} }; template class NotOwned : public std::shared_ptr { public: NotOwned(T& object) : std::shared_ptr(&object, NoDelete()) {}; }; #endif // TESTING_TOOLS