
24 Aug
2007
24 Aug
'07
3:23 p.m.
Peter Dimov wrote:
the author of X may have accidentally omitted the initialization of cn_. Without a default constructor, this doesn't compile and one needs to explicitly choose between
X(): cn_( &mx_ ) {}
and
X(): cn_( 0 ) {} // no checking
What about... template<Mutex> class condition { condition(); explicit condition(any_mutex_type); explicit condition(mutex_type& m); //... }; X(): cn_( mx_ ) {} X(): cn_( std::any_mutex ){} X(): cn_(){} Regards, Ion