Boost C++ Libraries: Ticket #3457: introduce move semantics to container types https://svn.boost.org/trac10/ticket/3457 <p> I am writing many routines where I would strongly prefer: <code>matrix&lt;double&gt; f(const matrix&lt;double&gt;&amp; in)</code> to <code>void f(const matrix&lt;double&gt;&amp; in, matrix&lt;double&gt;&amp; out )</code> </p> <p> There has been a lot of discussion about this from the C++ groups: </p> <ul><li>The move library to support this in C++03 </li><li><a class="ext-link" href="http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/"><span class="icon">​</span>http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/</a> </li></ul><p> Also, I see that this is native to MTL: <a class="ext-link" href="http://www.osl.iu.edu/research/mtl/mtl4/doc/matrix_assignment.html#move_semantics"><span class="icon">​</span>http://www.osl.iu.edu/research/mtl/mtl4/doc/matrix_assignment.html#move_semantics</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3457 Trac 1.4.3 Gunter Wed, 16 Sep 2009 22:00:40 GMT <link>https://svn.boost.org/trac10/ticket/3457#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3457#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56248" title="see #3457 * test/manual/test_move_semantics.cpp: example and manual ...">[56248]</a>) see <a class="new ticket" href="https://svn.boost.org/trac10/ticket/3457" title="#3457: Feature Requests: introduce move semantics to container types (new)">#3457</a> </p> <ul><li>test/manual/test_move_semantics.cpp: example and manual test case to demonstrate move semantics </li><li>test/manual/Jamfile.v2: added new target test_move_semantics </li><li>doc/ublas.css: added pre.screen class for code snippets, added p.credit class for thanks and credits </li><li>doc/overview.htm: fixed broken anchors and missing alt-attribute </li><li>doc/release_notes.htm: added new feature to release list </li><li>doc/options.htm: new page to document preprocessore switches (mostly copied from Wiki) </li><li>doc/index.htm: added link to options.htm </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>Gunter</dc:creator> <pubDate>Wed, 16 Sep 2009 22:05:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3457#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3457#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56249" title="see #3457 * matrix.hpp: added move semantics * vector.hpp: added ...">[56249]</a>) see <a class="new ticket" href="https://svn.boost.org/trac10/ticket/3457" title="#3457: Feature Requests: introduce move semantics to container types (new)">#3457</a> </p> <ul><li>matrix.hpp: added move semantics </li><li>vector.hpp: added move semantics </li></ul> </description> <category>Ticket</category> </item> <item> <author>nasos_i@…</author> <pubDate>Thu, 17 Sep 2009 00:40:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3457#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3457#comment:3</guid> <description> <p> Because for the bounded and c types, the move semantics don't have any effect, I think they should be disabled for now for those types, so that they don't promise something that they don't do. </p> <p> Also in the options.htm, I would propose the description to read: </p> <p> An immediate effect of this option is the elimination of the need for noalias in types &lt;tt&gt;vector&amp;lt;T&amp;gt;&lt;/tt&gt; and &lt;tt&gt;matrix&amp;lt;T&amp;gt;&lt;/tt&gt;, when assigned to the same type. This option doesn't have an effect on bounded and c types. Although it is rare, not all compilers support copy elision (that allows for move semantics), so a test must be performed to make sure that there is a benefit when it is enabled. A small demonstration and test can be found in test/manual/test_move_semantics.cpp </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gunter</dc:creator> <pubDate>Tue, 06 Oct 2009 22:12:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3457#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3457#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56622" title="see #3457: introduce move semantics to container types (Incomplete) * ...">[56622]</a>) see <a class="new ticket" href="https://svn.boost.org/trac10/ticket/3457" title="#3457: Feature Requests: introduce move semantics to container types (new)">#3457</a>: introduce move semantics to container types (Incomplete) </p> <ul><li>updated description </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>Gunter</dc:creator> <pubDate>Tue, 06 Oct 2009 22:35:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3457#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3457#comment:5</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/56623" title="see #3457 and see #3443: * merged ...">[56623]</a>) see <a class="new ticket" href="https://svn.boost.org/trac10/ticket/3457" title="#3457: Feature Requests: introduce move semantics to container types (new)">#3457</a> and see <a class="new ticket" href="https://svn.boost.org/trac10/ticket/3443" title="#3443: Tasks: improve documentation (new)">#3443</a>: </p> <ul><li>merged <a class="changeset" href="https://svn.boost.org/trac10/changeset/56162" title="see #3443: reformatted source because it was too ugly to do any changes. ">[56162]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/56164" title="doc/index.htm: added link to new release notes page ...">[56164]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/56248" title="see #3457 * test/manual/test_move_semantics.cpp: example and manual ...">[56248]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/56622" title="see #3457: introduce move semantics to container types (Incomplete) * ...">[56622]</a>,<a class="changeset" href="https://svn.boost.org/trac10/changeset/56249" title="see #3457 * matrix.hpp: added move semantics * vector.hpp: added ...">[56249]</a> into release </li><li>added move semantics for dense matrix and vector containers </li></ul> </description> <category>Ticket</category> </item> </channel> </rss>