Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Header: <memory>

Namespace: std

Show:
© 2014 Microsoft