$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Interprocess] shared_ptr in a non-throwing mode
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-04-06 12:29:56
El 06/04/2011 13:19, Pietro Versari escribió:
> Hi Ion (and everyone else),
>
> I'm a newbye and I have only one simple question:
> how can I construct a shared_ptr in a non-throwing mode?
>
> This example throw if there is enough space for MyType but isn't
> enough for my_shared_ptr:
>
> typedef managed_shared_ptr<MyType,managed_shared_memory>::type
> my_shared_ptr;
> my_shared_ptr sh_ptr = make_managed_shared_ptr(
> segment.construct<MyType>("object to share", std::nothrow)(), segment);
Then it's a bug ;-) Boost version please?
Best,
Ion