Boost logo

Boost :

From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-08-20 20:21:37


On Mon, 2008-07-28 at 22:54 +0200, Daniel Frey wrote:
> On Mon, 2008-07-28 at 23:01 +0300, Peter Dimov wrote:
> > Daniel Frey:
> >
> > > What about b) from my previous mail? Am I misreading the documentation
> > > (N2352/N2691)?
> >
> > N2691 is clear that there is only one std::make_shared. boost::make_shared
> > has a zero-argument overload because g++ incorrectly translated new
> > T(args...) to new T in the zero case. I don't know whether this has been
> > fixed.
>
> As a solution in order to fulfill N2691, wouldn't it be easier to fix it
> inside the function, by simply doing:
>
> if( sizeof...( Args ) == 0 )
> new( pv ) T();
> else
> new( pv ) T( detail::forward<Args>( args )... );

Ping?


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