Boost C++ Libraries: Ticket #2312: intrusive_ptr::operator= should have by-value argument https://svn.boost.org/trac10/ticket/2312 <p> When a copy assignment operator is implemented simply by doing copy-and-swap, it should pass its argument by value, instead of doing the copy inside the body of the function, to allow the compiler to do copy elision. As was discussed at the Boost developer mailing list, <a class="ext-link" href="http://lists.boost.org/Archives/boost/2008/09/142106.php"><span class="icon">​</span>Improving the assignment operators of various Boost types</a>. </p> <p> So please consider the attached patch. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2312 Trac 1.4.3 niels_dekker Wed, 10 Sep 2008 09:17:13 GMT attachment set https://svn.boost.org/trac10/ticket/2312 https://svn.boost.org/trac10/ticket/2312 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">intrusive_ptr_assignment.patch</span> </li> </ul> Ticket Peter Dimov Wed, 10 Sep 2008 11:03:51 GMT status, component, severity, type changed; owner set https://svn.boost.org/trac10/ticket/2312#comment:1 https://svn.boost.org/trac10/ticket/2312#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Peter Dimov</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">smart_ptr</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Problem</span> → <span class="trac-field-new">Optimization</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket Peter Dimov Wed, 10 Sep 2008 11:08:04 GMT <link>https://svn.boost.org/trac10/ticket/2312#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2312#comment:2</guid> <description> <p> This ticket depends on <a class="new ticket" href="https://svn.boost.org/trac10/ticket/2314" title="#2314: Bugs: Finish intrusive_ptr_test.cpp (new)">#2314</a>. </p> <p> Changing the assignment operator as suggested also allows us to eliminate the converting assignment. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Sat, 28 Feb 2009 17:03:24 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/2312#comment:3 https://svn.boost.org/trac10/ticket/2312#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket Georg Sauthoff <gsauthof@…> Fri, 07 Aug 2009 20:47:11 GMT <link>https://svn.boost.org/trac10/ticket/2312#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2312#comment:4</guid> <description> <p> I updated <a class="new ticket" href="https://svn.boost.org/trac10/ticket/2314" title="#2314: Bugs: Finish intrusive_ptr_test.cpp (new)">#2314</a> and attach a new trivial patch which includes elimination of the converting assignments. </p> <p> Best regards </p> </description> <category>Ticket</category> </item> <item> <author>Georg Sauthoff <gsauthof@…></author> <pubDate>Fri, 07 Aug 2009 20:48:37 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/2312 https://svn.boost.org/trac10/ticket/2312 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">intrusive_ptr.ass.value.patch</span> </li> </ul> Ticket Peter Dimov Thu, 24 Feb 2011 22:11:26 GMT status changed https://svn.boost.org/trac10/ticket/2312#comment:5 https://svn.boost.org/trac10/ticket/2312#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket