Boost logo

Boost :

From: Johan Torp (johan.torp_at_[hidden])
Date: 2008-05-06 09:07:13

I'm not sure what's best in this case. I find that there is often a certain
trade-off between ease of use and runtime insecurities.

For instance, it would have been useful to have a strict shared_ptr which
could never be null. It's implemented easily by removing the default
constructor and reset() and check+throw for non-null ptrs in the regular
constructor and reset(T*). You would lose default-constructibility so you
probably want to make the decision optional. Even if this could be
implemented nicely by some policy parameter+default parameter, the option
would mean a larger and more complicated abstraction for the user.

Best Regards, Johan

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