Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-08-06 20:14:22

troy d.straszheim wrote:
> [...]
> Somehow it has got stuck in my head that this should be
> shared_pointer_cast<>, but I'm having trouble justifying it, other than
> that it would look nice next to the dynamic_pointer_cast<> and so forth.
> shared_ptr<Widget> p = shared_ptr_cast<Widget>(new Widget);
> [...]

I kinda like the idea as well. In a sense, you *are* converting the
type of the pointer returned by new from a raw pointer to a
shared_ptr<>. However, I wonder how much benefit would be derived
from this change in practice. This would break all existing
shared_ptr<> code, wouldn't it?


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