Boost logo

Boost :

Subject: Re: [boost] Looking for thoughts on a new smart pointer: shared_ptr_nonnull
From: Daryle Walker (darylew_at_[hidden])
Date: 2013-10-09 04:50:10


Is
template < typename T >struct MySmartyPointer{T *p;
explicit constexprMySmartyPointer( T *p, bool throw_on_null = false ): p( p || !throw_on_null ? p : throw Something{} ){}};
a good substitute?

> > On 8 October 2013 13:17, Thorsten Ottosen <thorsten.ottosen_at_[hidden]>wrote:
> >> We are indeed going in circles. I can respect that some people don't want
> >> the overhead of the runtime check. I can also respect that people don't
> >> want to take down the whole server because of a bug in some subsystem.

Daryle W.
                                               


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk