25 Feb
2009
25 Feb
'09
12:41 p.m.
volatile long eventCount; template<class MostDerived> struct EvBase : sc::event<MostDerived> { EvBase() { long c = InterlockedIncrement(&eventCount); somelog << c << std::endl; } ~EvBase() { long c = InterlockedDecrement(&eventCount); somelog << c << std::endl; } };
add copy constructor: EvBase( const EvBase& rhs ) : sc::event<MostDerived>( rhs ) { long c = InterlockedIncrement(&eventCount); somelog << c << std::endl; } -- Ivan Kharin