Boost logo

Boost :

Subject: Re: [boost] Why no non-null smart pointers?
From: Jeff Hill (johill_at_[hidden])
Date: 2014-04-29 15:49:54

I did mention that, "no one suggests that shared_ptr should (or could) be
changed in ways that impacts backwards compatibility."

What I /am/ considering is if there is a way to make the shared_ptr
implement the null object paradigm, but only for a particular user type T,
but otherwise not impact current behavior of shared_ptr including revealing
in its public interface all that is good and bad with the nill state of raw

In the example above type ChessPiece might enforce the null object pattern
for shared_ptr but user types that don't specialize the null object factory
class would retain exactly current behavior.

Thanks for the reference, I will definitely have a close look.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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