|
Boost : |
Subject: Re: [boost] [Interprocess] Compile error with VC10
From: Ahmed Charles (ahmedcharles_at_[hidden])
Date: 2010-04-29 13:24:33
2010/4/24 Ion Gaztañaga <igaztanaga_at_[hidden]>:
> On 22/04/2010 15:57, cg wrote:
>>
>> I think VC10 should activate rvalue reference by default. And I have tried
>> to compile the code with and without BOOST_HAS_RVALUE_REFS defined,
>> but got the same error.
>
> However I think VC10 move semantics are broken, e.g. this does not compile
>
>
> //Movable is not copyable, private copy constructor
> movable function()
> { movable m; return boost::move(m); }
>
> int main()
> {
> Â //ERROR: error C2248: 'movable::movable' :
> Â //cannot access private member declared in class 'movable'
> Â movable m(function());
> Â return 0;
> }
I imagine boost::move is written with rvalue references v1 and
therefore doesn't work with vc2010, which implements v2. Is there a
reason why boost has to implement its own version of move? Every
compiler/library supporting rvalue references should have std::move
which will do the right thing.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk