Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-01-31 06:40:32


David Maisonave wrote:

> Since the current smart_ptr (policy_ptr) class at boost vault is on
> hold, I like to propose adding the following smart_ptr class to the
> boost library:
>
> http://code.axter.com/smart_ptr.h

 smart_ptr& operator=(const smart_ptr& Src)
 {
  if (m_type != m_type)
  {
   Src.lock();
   m_ownership_policy.assign(m_type, m_clone_fct, Src.m_type,
Src.m_clone_fct, Src.m_ownership_policy, m_ownership_policy);
   Src.unlock();
  }
  return *this;
 }

You need a unit test. ;-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk