Boost logo

Boost :

Subject: Re: [boost] Looking for thoughts on a new smart pointer: shared_ptr_nonnull
From: Daniel James (daniel_at_[hidden])
Date: 2013-10-03 11:35:18

On 3 October 2013 16:04, Matt Calabrese <rivorus_at_[hidden]> wrote:
> The point is, even if you happen to throw in a particular implementation,
> if the precondition is such that the constructor cannot take a null
> pointer, then the throwing behavior is never to be relied upon by the user
> anyway.

It shouldn't be a pre-condition. The intent of the class is to
guarantee that it is never null, it shouldn't assume that users are
smart enough to get that right, because we really aren't.

Boost list run by bdawes at, gregod at, cpdaniel at, john at