Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-01-14 12:22:43


David Abrahams wrote:
>
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
> > From: "Daniel Frey" <daniel.frey_at_[hidden]>
> >
> >> 'get' implies (at least to me), that it only fetches a pointer/reference
> >> to something which already exists.
> >
> > In a way, this is exactly what make_shared/get_shared_ptr does; it
> > fetches a pointer to something which already exists, the object.
>
> I think you misunderstand Daniel here. get_... comes with an
> implication that it returns an lvalue which already exists, i.e. that
> the resulting shared_ptr is already there somewhere inside the
> weak_ptr.

Indeed I was thinking along these lines, at least from the sematic point
of view. What the function does internally is not that important, but
the result is, that a get()-call "promises" that it can never fail IMHO.

Regards, Daniel

-- 
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

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