Boost C++ Libraries: Ticket #2159: release() https://svn.boost.org/trac10/ticket/2159 <p> I propose the addition of a new function to the boost::optional class. </p> <p> T &amp; release() </p> <p> This function should reset() the internal value, and return it. It should throw if the optional does not contain any internal T. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2159 Trac 1.4.3 Steven Watanabe Sun, 31 May 2009 18:52:53 GMT <link>https://svn.boost.org/trac10/ticket/2159#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2159#comment:1</guid> <description> <p> This should be closed as wontfix. </p> <ul><li>It is impossible to return a reference to a value that has been destroyed. </li><li>This functionality can be implemented on top of the current interface. </li><li>Throwing an exception is inconsistent with the rest of boost::optional's interface. </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Mon, 10 May 2010 15:46:30 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2159#comment:2 https://svn.boost.org/trac10/ticket/2159#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">wontfix</span> </li> </ul> <p> Wontfix. As it is impossible to implement requested functionality. </p> Ticket