24 Aug
2005
24 Aug
'05
3:51 p.m.
At 1:25 AM -0400 8/23/05, Gennadiy Rozental wrote:
template<typename F> class global_fixure_impl : public global_fixure { virtual void setup() { new (m_space) F; } virtual void teardown() { ((F*)m_space)->~F(); }
char m_space[sizeof(F)]; };
Alignment of m_space must be appropriate for the alignment of F. I think
this can be addressed by putting m_space in a union with a value whose type
is the result of
boost::type_with_alignment