|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-14 12:34:08
From: "David Abrahams" <dave_at_[hidden]>
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
> >>From semantic point of view, it's more like "This function will obtain a
> > shared_ptr to the object identified by the weak_ptr argument. If there
is no
> > such object, an empty shared_ptr is returned."
> >
> > To me, get_shared_ptr seems to express this a bit better than
make_shared.
> > But I might be wrong.
>
> If it were equivalent to construction, you could just do
>
> static_cast<shared_ptr<T> >(weak)
>
> right? I realize this doesn't deduce T.
True. But I don't think of make_shared/get_shared_ptr as a cast. It's more
of the "give me a pointer to the object identified by this opaque handle"
variety.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk