cpp/memory/unique ptr/unique ptr

@1@ Constructs a that owns nothing. Value-initializes the stored pointer and the stored deleter. Requires that is  and that construction does not throw an exception. .

@2@ Constructs a which owns p, initializing the stored pointer with p and value-initializing the stored deleter. Requires that is  and that construction does not throw an exception. .

@3-4@ Constructs a object which owns, initializing the stored pointer with  and initializing a deleter  as below (depends upon whether  is a reference type)


 * @a@ If is non-reference type, then the signatures are:


 * @b@ If is an lvalue-reference type, then the signatures are:


 * @c@ If is an lvalue-reference type, then the signatures are:

@@In all cases the deleter is initialized from. .

@2-4@ in the specialization for arrays behave the same as the constructors that take a pointer parameter in the primary template except that they additionally do not participate in overload resolution unless one of the following is true:
 * is the same type as, or
 * is std, or
 * is the same type as and  is some pointer type  such that  is implicitly convertible to.

@5@ Constructs a by transferring ownership from  to  and stores the null pointer in. This constructor only participates in overload resolution if is. If is not a reference type, requires that it is nothrow- (if  is a reference,  and  after move construction reference the same value)

@6@ Constructs a by transferring ownership from  to, where  is constructed with a specified deleter. It depends upon whether is a reference type, as following:
 * @a@ if is a reference type, this deleter is copy constructed from 's deleter (requires that this construction does not throw)
 * @b@ if is a non-reference type, this deleter is move constructed from 's deleter (requires that this construction does not throw)
 * @b@ if is a non-reference type, this deleter is move constructed from 's deleter (requires that this construction does not throw)

@@ This constructor only participates in overload resolution if all of the following is true:
 * @a@ is implicitly convertible to
 * @b@ U is not an array type
 * @c@ Either is a reference type and  is the same type as, or  is not a reference type and  is implicitly convertible to

@6@ in the specialization for arrays behaves the same as in the primary template, except that it will only participate in overload resolution if all of the following is true
 * is an array type
 * is the same type as
 * is the same type as
 * is convertible to
 * either is a reference type and  is the same type as, or  is not a reference type and  is implicitly convertible to.

@7@ Constructs a where the stored pointer is initialized with  and the stored deleter is value-initialized. This constructor only participates in overload resolution if is implicitly convertible to  and  is the same type as.