Subject: Re: [boost] Looking for thoughts on a new smart pointer: shared_ptr_nonnull
From: Luke Bradford (lukebradford01_at_[hidden])
Date: 2013-10-02 14:56:44
> I respectfully disagree. A reference is much more restricted than a
> smart pointer that cannot be null: it cannot change reference and it
> never owns the object it references.
On Wed, Oct 2, 2013 at 1:48 PM, Mostafa <mostafa_working_away_at_[hidden]>wrote:
> On Wed, 02 Oct 2013 06:07:40 -0700, Thorsten Ottosen <
> thorsten.ottosen_at_[hidden]> wrote:
> On 02-10-2013 14:52, Jeff Flinn wrote:
>> As Matt said this would be a precondition violation so an assert would
>>> be better than a runtime exception.
>> I'd rather see we do as in Boost.PtrContainer: use BOOST_THROW_EXCEPTION
>> such that if BOOST_NO_EXCEPTION is defined
>> (or BOOST_SMART_PTR_NO_EXCEPTION), this becomes an assert. The run-time
>> check during construction is not going to be noticed.
> Unsubscribe & other changes: http://lists.boost.org/**