id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 1109,intrusive_ptr needs a helper base class,Peter Dimov,Peter Dimov,"http://lists.boost.org/Archives/boost/2006/04/103182.php http://lists.boost.org/Archives/boost/2006/04/103203.php http://lists.boost.org/Archives/boost/2006/04/103267.php http://lists.boost.org/Archives/boost/2006/04/103273.php {{{ class counted_base { private: mutable detail::atomic_count count_; protected: counted_base(): count_( 0 ) {} virtual ~counted_base() {} counted_base( counted_base const & ): count_( 0 ) {} counted_base& operator=( counted_base const & ) { return *this; } public: inline friend void intrusive_ptr_add_ref( counted_base const * p ) { ++p->count_; } inline friend void intrusive_ptr_release( counted_base const * p ) { if( --p->count_ == 0 ) delete p; } long use_count() const { return count_; } }; }}} http://lists.boost.org/Archives/boost/2006/04/103306.php",Feature Requests,closed,To Be Determined,smart_ptr,,Problem,fixed,,