Boost logo

Boost :

Subject: [boost] [shared_ptr] Design question about make_shared
From: Loïc Joly (loic.actarus.joly_at_[hidden])
Date: 2011-06-14 20:16:05

Hello everybody,

I recently wondered about the choice to make make_shared a free
function, and not a static member function:

struct A{...}; struct B:A {...};

shared_ptr<A> ptr = make_shared<B>(arg1,arg2);
shared_ptr<A> ptr = shared_ptr<B>::make(arg1, arg2);

I was wondering if this is just a stylistic choice, or if there are some

Thank you for any information.


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