copy_ptr assignment operator