-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Gennadiy Rozental Sent: Monday, August 22, 2005 10:26 PM To: boost-users@lists.boost.org Subject: [BULK] Re: [Boost-users] [Test] redirecting unit test report Importance: Low
#include <iostream>
class global_fixure { public: global_fixure() { pointer() = this; } virtual void setup() = 0; virtual void teardown() = 0;
static global_fixure*& pointer() { static global_fixure* p = 0; return p; }
protected: ~global_fixure() {} };
Why isnt the destructor virtual? Is it because you will never have an instance of this class? What happens if delete a_global_fixture; is called? [snipped some stuff] All this could be avoided if you go the route of BOOST_ASSERT in that you can define hooks via some free standing functions.