|
Boost Users : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-08-24 18:18:29
>>virtual void setup() { m_space = new char[sizeof(F)]; new (m_space)
>>F; }
>>virtual void teardown() { ((F*)m_space)->~F(); delete m_space; }
>>char* m_space;
>
> In that case, why use m_space at all. Instead, just something like
> the following (which may have stupid syntax errors):
>
> template<typename F>
> class global_fixture_impl : public global_fixture {
> virtual void setup() { m_f = new F; };
> virtual void teardown() { delete m_f; m_f = 0; };
> F* m_f;
> }
Yes, you right of course ;))
Gennadiy
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