Boost logo

Boost :

Subject: Re: [boost] [Interprocess] Compile error with VC10
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-04-22 19:07:14


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.

Can you find the definition of std::move and std::forward in the
standard library of Visual 2010? I know it changed between beta and the
release.

I think changing the definition of move to

template <class T> inline
typename remove_reference<T>::type&& move(T&& t)
{ return static_cast<remove_reference<T>::type&&>(t); }

should work. This approach provokes a warning in the old gcc-4.3
approach ("returning reference to temporary"), but it should be a quick
solution for you.

Best,

Ion


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