- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
template<typename U>
shared_ptr(const shared_ptr<U> & ptr) throw()
: m_value(0)
, m_ref_count(0)
{
m_value = static_cast<T *>(ptr.get());
if(m_value)
{
m_ref_count = reinterpret_cast<const shared_ptr &>(ptr).m_ref_count;
++*m_ref_count;
}
}
Follow us!