Поделиться через


CAutoPtr::operator =

The assignment operator.

template< >
CAutoPtr< T > & operator =(
   CAutoPtr< T > & p 
);
template< typename TSrc >
CAutoPtr< T > & operator =(
   CAutoPtr< TSrc > & p 
);

Параметры

  • p
    A pointer.

  • TSrc
    A class type.

Возвращаемое значение

Returns a reference to a CAutoPtr< T >.

Заметки

The assignment operator detaches the CAutoPtr object from any current pointer and attaches the new pointer, p, in its place.

Пример

See the example in the CAutoPtr Overview.

Требования

Header: atlbase.h

См. также

Основные понятия

CAutoPtr Class

CAutoPtr Members

CAutoPtr::Attach

CAutoPtr::Detach