Boost C++ Libraries: Ticket #939: Turn on tmpl shared_ptr methods for MSVC https://svn.boost.org/trac10/ticket/939 <pre class="wiki">Can you turn on the templated shared_ptr (copy?) constructor and assignment operator in MSVC++ (by checking for BOOST_MSVC6_MEMBER_TEMPLATES)? And/or publish the work-around (define a base class for templated shared_ptr) given in the Yahoo group? It's very useful. Three problems with simply turning them on, with workarounds (are there other problems?): (1) Compiler error. Just put the standard copy constructor and assignment operator after the template versions. (2) Silent failure if copying shared_ptr with same pointer type (MSVC++ generates its own copy constructor instead of using the templated constructor.) It works as long as the normal copy constructor is defined (which is already the case.) (3) No templated friends. Just don't do "private" (this workaround is already in place for other platforms.) Attached is smart_ptr.hpp (modified from 1_21_2) with the templated members simply turned on. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/939 Trac 1.4.3 beman_dawes Fri, 06 Jul 2001 13:38:36 GMT status changed https://svn.boost.org/trac10/ticket/939#comment:1 https://svn.boost.org/trac10/ticket/939#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=51042 Gary Powell submitted essentially the same request, and his suggested changes have been checked into CVS </pre> Ticket