Boost C++ Libraries: Ticket #7620: Basic rvalue and C++11 support https://svn.boost.org/trac10/ticket/7620 <p> This patch adds <code>variant(variant&amp;&amp;)</code>, <code>variant&amp; operator=(variant&amp;&amp;)</code> and <code>template &lt;class T&gt; variant&amp; operator=(T&amp;&amp;)</code> functions to Boost.Variant for compilers with rvalue references support (rvalue emulation via Boost.Move is not used for compatability reasons). </p> <p> <code>template &lt;class T&gt; variant&amp; operator=(T&amp;&amp;)</code> function is enabled only if T&amp;&amp; is a rvalue reference. </p> <p> Patch is constructded via copying original assign functions and adding move semantics to them. Example: Visitor <code>copy_into</code> was copied as <code>move_into</code>. Copy constructors in <code>internal_visit</code> functions were replaced by move constructors. </p> <p> If compiler supports rvalue references, std::move is imported to namespace ::boost::detail::variant (this also worked around bug with unqualified call to <code>move()</code> in MSVC2010) </p> <p> <code>BOOST_NOEXCEPT</code> modifiers added to some methods. </p> <p> This patch improves performance up to 6 times for some operations. Was tested on GCC-4.6 (with and without c++11 mode) and MSVC2012. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7620 Trac 1.4.3 Antony Polukhin Thu, 01 Nov 2012 17:50:43 GMT attachment set https://svn.boost.org/trac10/ticket/7620 https://svn.boost.org/trac10/ticket/7620 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">rvalue_move.patch</span> </li> </ul> Ticket Antony Polukhin Thu, 01 Nov 2012 17:52:48 GMT attachment set https://svn.boost.org/trac10/ticket/7620 https://svn.boost.org/trac10/ticket/7620 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">rvalue_test.cpp</span> </li> </ul> <p> Boost.Test for rvalue support of variant </p> Ticket Antony Polukhin Thu, 01 Nov 2012 17:54:49 GMT attachment set https://svn.boost.org/trac10/ticket/7620 https://svn.boost.org/trac10/ticket/7620 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">move_perf.cpp</span> </li> </ul> <p> Performance test for new rvalue methods </p> Ticket Antony Polukhin Sun, 11 Nov 2012 08:05:04 GMT <link>https://svn.boost.org/trac10/ticket/7620#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7620#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81293" title="Added basic rvalue support and marked some functions with ...">[81293]</a>) Added basic rvalue support and marked some functions with BOOST_NOEXCEPT (#refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7620" title="#7620: Patches: Basic rvalue and C++11 support (closed: fixed)">#7620</a>) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Wed, 21 Nov 2012 14:47:15 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7620#comment:2 https://svn.boost.org/trac10/ticket/7620#comment:2 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81455" title="Merge from trunk: added basic rvalue support and marked some functions ...">[81455]</a>) Merge from trunk: added basic rvalue support and marked some functions with BOOST_NOEXCEPT (fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7620" title="#7620: Patches: Basic rvalue and C++11 support (closed: fixed)">#7620</a>) </p> Ticket Antony Polukhin Wed, 21 Nov 2012 14:51:16 GMT <link>https://svn.boost.org/trac10/ticket/7620#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7620#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/81456" title="Merge from trunk: merge performance tests (refs #7620)">[81456]</a>) Merge from trunk: merge performance tests (refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7620" title="#7620: Patches: Basic rvalue and C++11 support (closed: fixed)">#7620</a>) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Wed, 21 Nov 2012 14:59:23 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/7620#comment:4 https://svn.boost.org/trac10/ticket/7620#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> Ticket