
21 Aug
2008
21 Aug
'08
12:21 a.m.
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?