Boost C++ Libraries: Ticket #5287: boost/interprocess/sync/file_lock.hpp on msvc 10 fails to compile https://svn.boost.org/trac10/ticket/5287 <p> Compiling this simple code fails on MS Vis Studio 10 64bit version. </p> <div class="wikipage" style="font-size: 80%"><div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/interprocess/sync/file_lock.hpp&gt;</span><span class="cp"></span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span> </pre></div></div></div><p> The exception is: </p> <pre class="wiki">1&gt; test1.cpp 1&gt;c:\program files (x86)\boost\boost_1_44\boost\interprocess\detail\move.hpp(342): error C2440: 'return' : cannot convert from 'boost::interprocess::file_lock' to 'boost::interprocess::file_lock &amp;&amp;' 1&gt; You cannot bind an lvalue to an rvalue reference 1&gt; c:\program files (x86)\boost\boost_1_44\boost\interprocess\sync\file_lock.hpp(68) : see reference to function template instantiation 'boost::interprocess::file_lock &amp;&amp;boost::interprocess::move&lt;boost::interprocess::file_lock&amp;&gt;(T)' being compiled 1&gt; with 1&gt; [ 1&gt; T=boost::interprocess::file_lock &amp; 1&gt; ] 1&gt; 1&gt;Build FAILED. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5287 Trac 1.4.3 Ion Gaztañaga Fri, 01 Apr 2011 21:25:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5287#comment:1 https://svn.boost.org/trac10/ticket/5287#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in Boost 1.47 </p> Ticket