다음을 통해 공유


unique_ptr operator=

Assigns the address of the provided unique_ptr to the current one.

unique_ptr& operator=(
    unique_ptr&& _Right
);
template<class Type2, Class Del2>
    unique_ptr& operator=(
        unique_ptr<Type, Del>&& _Right
    );
unique_ptr& operator=(
    pointer-type
);

매개 변수

  • A unique_ptr reference used to assign the value of to the current unique_ptr.

설명

The member functions call reset(_Right.release()) and move _Right.stored_deleter to stored_deleter, then return *this.

요구 사항

헤더 <memory>

네임스페이스: std

참고 항목

참조

unique_ptr 클래스

<memory>

C++ 표준 라이브러리의 스레드 보안

기타 리소스

unique_ptr 멤버

<memory> 멤버