
31 Jan
2006
31 Jan
'06
11:40 a.m.
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:
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. ;-)