Boost C++ Libraries: Ticket #6183: [move][doc] missing return type https://svn.boost.org/trac10/ticket/6183 <p> this code in introduction document: </p> <pre class="wiki">template &lt;class T&gt; swap(T&amp; a, T&amp; b) { T tmp(a); // now we have two copies of a a = b; // now we have two copies of b b = tmp; // now we have two copies of tmp (aka a) } </pre><pre class="wiki">template &lt;class T&gt; swap(T&amp; a, T&amp; b) { T tmp(::boost::move(a)); a = ::boost::move(b); b = ::boost::move(tmp); } </pre><p> <a href="http://www.boost.org/doc/libs/1_48_0/doc/html/move/introduction.html">http://www.boost.org/doc/libs/1_48_0/doc/html/move/introduction.html</a> </p> <p> it seem missing return type(void). should be: </p> <pre class="wiki">template &lt;class T&gt; void swap(T&amp; a, T&amp; b) { T tmp(a); // now we have two copies of a a = b; // now we have two copies of b b = tmp; // now we have two copies of tmp (aka a) } </pre><pre class="wiki">template &lt;class T&gt; void swap(T&amp; a, T&amp; b) { T tmp(::boost::move(a)); a = ::boost::move(b); b = ::boost::move(tmp); } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6183 Trac 1.4.3 Ion Gaztañaga Fri, 23 Dec 2011 12:10:30 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6183#comment:1 https://svn.boost.org/trac10/ticket/6183#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> Thanks fixed in trunk at revision: 76115 </p> Ticket