Boost C++ Libraries: Ticket #2398: Supply type info to debug hooks https://svn.boost.org/trac10/ticket/2398 <p> I have found it very useful to have access to the type names of shared objects for debugging purposes. May I suggest adding a type_info parameter to the hook functions: </p> <pre class="wiki">void sp_scalar_constructor_hook( void * px, std::size_t size, std::type_info const &amp; ti, void * pn ); void sp_scalar_destructor_hook( void * px, std::size_t size, std::type_info const &amp; ti, void * pn ); </pre><p> Then sp_counted_impl_p can call them like this: </p> <pre class="wiki">explicit sp_counted_impl_p( X * px ): px_( px ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook( px, sizeof(X), typeid(X), this ); #endif } virtual void dispose() // nothrow { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_destructor_hook( px_, sizeof(X), typeid(X), this ); #endif boost::checked_delete( px_ ); } </pre><p> Thanks! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2398 Trac 1.4.3 Peter Dimov Sat, 28 Feb 2009 17:10:46 GMT status changed; milestone set https://svn.boost.org/trac10/ticket/2398#comment:1 https://svn.boost.org/trac10/ticket/2398#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket Peter Dimov Thu, 24 Feb 2011 22:12:29 GMT status changed https://svn.boost.org/trac10/ticket/2398#comment:2 https://svn.boost.org/trac10/ticket/2398#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket Peter Dimov Wed, 11 Dec 2013 17:45:04 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2398#comment:3 https://svn.boost.org/trac10/ticket/2398#comment:3 <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> Closing as "wontfix" because the ticket is too old. Please reopen if still relevant. </p> Ticket