Boost logo

Boost :

From: Stefano Delli Ponti (stefano.delliponti_at_[hidden])
Date: 2003-01-14 10:34:50


From: "Peter Dimov" <pdimov_at_[hidden]>
> I'm thinking of renaming make_shared(weak_ptr), as the current similarity
> with make_pair is undesirable. The best replacement I can come up with is
> get_shared_ptr. I.e. instead of
>
> if(shared_ptr<X> px = make_shared(wp))
> {
> }
>
> the pattern will look like
>
> if(shared_ptr<X> px = get_shared_ptr(wp))
> {
> }
>
> Comments? Suggestions?

The convention to name make_X an object generator is pretty usual.
It is also a standard boost convention:
http://www.boost.org/more/generic_programming.html#object_generator
Why do you want to change it?
I think that get_shared_prt is confusing.

Sted


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