Boost logo

Boost :

Subject: Re: [boost] [shared_ptr] Bug in perfect forwarding test?
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-04-26 12:41:41


John Maddock wrote:
> Now that rvalue refs are enabled for VC++10 the perfect forwarding test
> fails: http://tinyurl.com/367o3ab
>
> This looks like a legitimate failure to me, as the constructor to Y
> requires an "int&" non-const reference, but the make_shared_ptr function
> passes a "const int&". Ah... actually this may be to do with the fact
> that the header is predicated on BOOST_HAS_VARIADIC_TMPL as well as
> BOOST_HAS_RVALUE_REFS where as the test case is only predicated on
> BOOST_HAS_RVALUE_REFS?

Yes, it seems so. The non-variadic version doesn't attempt perfect
forwarding at all. Patched in trunk.

> BTW there's an rvalue-refs related failure with gcc-4.5 in C++0x mode as
> well: http://tinyurl.com/37quwbj

These should be fixed now. Interesting that VC10 doesn't complain about them
too.


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