Boost C++ Libraries: Ticket #2836: Request boost::optional<T>::optional_assign_to, optional_move_to, optional_swap https://svn.boost.org/trac10/ticket/2836 <p> I request the three member functions </p> <p> template&lt; class U &gt; bool boost::optional&lt;T&gt;::optional_assign_to(U&amp; t) const; template&lt; class U &gt; bool boost::optional&lt;T&gt;::optional_move_to(U&amp; t); bool boost::optional&lt;T&gt;::optional_swap(T&amp; t); </p> <p> which, if !*this, return false, and otherwise return true and are equivalent to </p> <p> t=<strong>this; t=</strong>this; and *this may have any value after the move std::swap( t, <strong>this ); </strong></p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2836 Trac 1.4.3 niels_dekker Sat, 07 Mar 2009 12:46:48 GMT owner, status changed; cc set https://svn.boost.org/trac10/ticket/2836#comment:1 https://svn.boost.org/trac10/ticket/2836#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">niels_address_until_2010-10-10@…</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Niels Dekker</span> to <span class="trac-author">niels_dekker</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Discussion on this subject: [boost] [optional] little addition <a class="ext-link" href="http://lists.boost.org/Archives/boost/2009/02/149009.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2009/02/149009.php</a> </p> Ticket