Boost logo

Boost :

Subject: Re: [boost] [Interprocess] Compile error with VC10
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-04-22 10:19:06


Ion Gaztañaga wrote:
> On 22/04/2010 14:38, cg wrote:
>> I am trying Interprocess with VS2010, and got some compile error, the
>> error message
>> is:
>>
>> 1>ClCompile:
>> 1>boost/interprocess/detail/move.hpp(358): error C2440: 'return' :
>> cannot convert from 'boost::interprocess::mapped_region' to
>> 'boost::interprocess::mapped_region &&'
>> 1> You cannot bind an lvalue to an rvalue reference
>>
>> Any quick fix for it?
>
> Not with such little information.

You need to static_cast to &&, the new rvalue references no longer bind to
lvalues without a cast. Or use std::move which should know what to do.


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