Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-12 13:22:39


From: "Darin Adler" <darin_at_[hidden]>
> I think that bad_weak_to_shared_cast should be part of the public
interface,
> not part of boost::detail, since it can be thrown by the shared_ptr
> constructor that takes a weak_ptr parameter.

Yes, we probably need to move it to boost::.

> I think we should remove the "// may throw" comments, because they are
more
> likely to be mistaken for "// never throws" than to be helpful.

Well, I don't know, really. I comment whatever feels worth commenting. I
definitely would never confuse "// may throw" with "// never throws".

> I'm not certain that retaining operator-> for weak_ptr is a good idea,
> because the lifetime of the implicit shared_ptr might be non-obvious.

operator-> is a convenient shorthand for "I know what I'm doing, this
weak_ptr is nonzero." It is safe in its current form.


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