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: http://www.nabble.com/-thread--Expected-behaviour-of-condition-variable-wait-when-the-mutex-is-not-locked-tp17049218p17082477.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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