Boost C++ Libraries: Ticket #4151: option_description::option_description(3 args) is exception-unsafe https://svn.boost.org/trac10/ticket/4151 <p> Given the code in libs/program_options/src/options_description.cpp: </p> <pre class="wiki">option_description:: option_description(const char* name, const value_semantic* s, const char* description) : m_description(description), m_value_semantic(s) { this-&gt;set_name(name); } </pre><p> s leaks in case if initialization of m_description throws. </p> <p> The simplest cure is to make option::description::m_value_semantic member to be before all other members. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4151 Trac 1.4.3 anonymous Mon, 26 Apr 2010 06:02:59 GMT summary changed https://svn.boost.org/trac10/ticket/4151#comment:1 https://svn.boost.org/trac10/ticket/4151#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">option_description::option_description(3 params) is exception-unsafe</span> → <span class="trac-field-new">option_description::option_description(3 args) is exception-unsafe</span> </li> </ul> Ticket anonymous Mon, 26 Apr 2010 06:26:42 GMT <link>https://svn.boost.org/trac10/ticket/4151#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4151#comment:2</guid> <description> <p> The proper solution is to use smart pointers everywhere. </p> </description> <category>Ticket</category> </item> </channel> </rss>