|
Boost Users : |
From: Sohail Somani (s.somani_at_[hidden])
Date: 2005-08-23 12:15:24
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
> Gennadiy Rozental
> Sent: Monday, August 22, 2005 10:26 PM
> To: boost-users_at_[hidden]
> 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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net