Boost logo

Boost :

From: Johan Råde (rade_at_[hidden])
Date: 2008-04-02 18:11:52


Ross MacGregor wrote:
> I just created a very small smart pointer libary for our project. It will
> contain two types of shared pointers: SharedHandle and NullableSharedHandle.
> SharedHandle will be a shared pointer that cannot be null by ensuring a
> non-null construction while NullableSharedHandle will basically be a typedef
> for boost::shared_ptr.
>
> I firmly believe that code can be made more reliable by minimizing the use
> of nullable pointers.

[snip]

Your idea certainly could be useful.
It should probably be combined with the Null Object Pattern.

However, having many different smart pointers would make it more difficult
for different software components to interact with each other.

--Johan Råde


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