Boost logo

Boost Users :

Subject: Re: [Boost-users] non nullable smart pointers
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-11-15 03:05:27

On Fri, Nov 14, 2008 at 8:20 PM, Brendan Miller <catphive_at_[hidden]> wrote:
> On Fri, Nov 14, 2008 at 7:23 PM, Emil Dotchevski
>> On Fri, Nov 14, 2008 at 6:16 PM, Brendan Miller <catphive_at_[hidden]> wrote:
>>> I'm also aware of a number of problems with the shared_ptr
>>> implementation, specifically that it creates a second allocation for
>>> the counter (the counted body problem)
>> Using make_shared avoids the separate allocation for the control block.
> I don't see a make_shared anywhere in the boost shared_ptr documentation...
> Am I looking in the wrong place?
> Yeah, I was wondering why someone hadn't done something like this...
> but I don't see it documented anywhere. Also, is this in TR1/C++0x's
> shared_ptr? I've never seen a reference to it anywhere.

I'm not sure about documentation but make_shared is available in

Also see
and Peter Dimov's web site for more shared_ptr

Emil Dotchevski
Reverge Studios, Inc.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at