28 Apr
2014
28 Apr
'14
5:42 p.m.
Maybe there /is/ even a backwards compatible solution. Perhaps an optional null object pattern could be employed in methods, and or constructors, of shared_ptr that might establish a raw nill state? Perhaps something like this obviously oversimplified example could be use. template < typename T> void shared_ptr < T > :: reset ( T * p = 0 ) { if ( p ) { /* what happens in shared_ptr now */ } else { /* new behavior in shared_ptr, when it detects a nill raw pointer */ *this = NullObjectTypes < T > :: factory (); } } Jeff -- View this message in context: http://boost.2283326.n4.nabble.com/Why-no-non-null-smart-pointers-tp2642959p... Sent from the Boost - Dev mailing list archive at Nabble.com.