
20 Nov
2007
20 Nov
'07
6:18 a.m.
Assume you have this: void some_func(shared_ptr<some_class> p); some_class * ptr = ...; some_func(ptr); Would you really want an automatic conversion of ptr to shared_ptr<some_class> ? Best, John
template<class T> class shared_ptr { template<class Y> explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete { detail::sp_enable_shared_from_this( pn, p, p ); } };
-- http://John.Torjo.com -- C++ expert ... call me only if you want things done right