System::SmartPtr::operator= 方法

SmartPtr::operator=(const SmartPtr<Q>&) method

复制赋值 SmartPtr 对象。执行所需的类型转换。

template<typename Q> SmartPtr_ & System::SmartPtr<T>::operator=(const SmartPtr<Q> &x)
参数描述
Qx 所指向对象的类型。
参数类型描述
xconst SmartPtr<Q>&指向复制赋值的指针。

ReturnValue

对该对象的引用。

另见

SmartPtr::operator=(const SmartPtr_&) method

复制赋值 SmartPtr 对象。

SmartPtr_ & System::SmartPtr<T>::operator=(const SmartPtr_ &x)
参数类型描述
xconst SmartPtr_&指向复制赋值的指针。

ReturnValue

对该对象的引用。

另见

SmartPtr::operator=(Pointee_ *) method

将原始指针赋给 SmartPtr 对象。

SmartPtr_ & System::SmartPtr<T>::operator=(Pointee_ *p)
参数类型描述
pPointee_ *要赋值的指针值。

ReturnValue

对该对象的引用。

另见

SmartPtr::operator=(SmartPtr_&&) method

移动赋值 SmartPtr 对象。x 将变得不可用。

SmartPtr_ & System::SmartPtr<T>::operator=(SmartPtr_ &&x) noexcept
参数类型描述
xSmartPtr_&&指向移动赋值的指针。

ReturnValue

对该对象的引用。

另见

SmartPtr::operator=(std::nullptr_t) method

将指针值设为 nullptr。

SmartPtr_ & System::SmartPtr<T>::operator=(std::nullptr_t)

ReturnValue

对该对象的引用。

另见