24 Aug
2005
24 Aug
'05
9:35 p.m.
At 4:22 PM -0400 8/24/05, Gennadiy Rozental wrote:
You maybe right. I will use new then,
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; }