Boost C++ Libraries: Ticket #2060: auto_ptr support for unit_test_log.set_formatter https://svn.boost.org/trac10/ticket/2060 <p> The member function <code>void boost::unit_test::unit_test_log_t::set_formatter( boost::unit_test::unit_test_log_formatter* )</code> gives the log ownership of the given formatter. Isn't it customary to use <code>std::auto_ptr&lt;boost::unit_test::unit_test_log_formatter&gt;</code> for this purpose? The intentions would be clearer. And it would minimize the chance of submitting an object created in an incompatible manner. </p> <p> This should be implemented in a new member function, so the current one can stay (but depreciated) for backwards compatibility. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2060 Trac 1.4.3 Gennadiy Rozental Sun, 14 Sep 2008 07:39:01 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2060#comment:1 https://svn.boost.org/trac10/ticket/2060#comment:1 <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> This function is similar to the scoped_ptr::reset. It might be just a bit safer to pass auto_ptr. But I don't believe it warrants interface change. Also I am a bit unsure I want to mix different memory management tools. I also prefer to stay away from auto_ptr as a general rule. Maybe we can pass scoped_ptr and move it into data member once this functionality available. </p> <blockquote> <p> All in all this is advanced API. One should assume person using it will have a reason to understand what to pass. </p> </blockquote> Ticket