void reset(T* _p = NULL) { swap(IntrusivePtr(_p)); }
IntrusivePtr& operator=(const IntrusivePtr& other) { T* p = other.ptr.load(); swap(IntrusivePtr(p)); return *this; }
IntrusivePtr exchange(T* other) { IntrusivePtr old = swap(IntrusivePtr(other)); return old; }
IntrusivePtr(const IntrusivePtr& other) : ptr(NULL) { T* p = other.ptr.load(); swap(IntrusivePtr(p)); }
void reset (T* rhs) { IntrusivePtr (rhs).swap (*this); }
void reset () { IntrusivePtr ().swap (*this); }
IntrusivePtr& operator= (T* rhs) { IntrusivePtr (rhs).swap (*this); return *this; }
IntrusivePtr& operator= (IntrusivePtr<U> const& rhs) { IntrusivePtr (rhs).swap (*this); return *this; }