20 General utilities library [utilities]

20.11 Smart pointers [smartptr]

20.11.1 Class template unique_­ptr [unique.ptr]

20.11.1.5 Creation [unique.ptr.create]

template<class T, class... Args> unique_ptr<T> make_unique(Args&&... args);
Constraints: T is not an array type.
Returns: unique_­ptr<T>(new T(std​::​forward<Args>(args)...)).
template<class T> unique_ptr<T> make_unique(size_t n);
Constraints: T is an array of unknown bound.
Returns: unique_­ptr<T>(new remove_­extent_­t<T>[n]()).
template<class T, class... Args> unspecified make_unique(Args&&...) = delete;
Constraints: T is an array of known bound.
template<class T> unique_ptr<T> make_unique_for_overwrite();
Constraints: T is not an array type.
Returns: unique_­ptr<T>(new T).
template<class T> unique_ptr<T> make_unique_for_overwrite(size_t n);
Constraints: T is an array of unknown bound.
Returns: unique_­ptr<T>(new remove_­extent_­t<T>[n]).
template<class T, class... Args> unspecified make_unique_for_overwrite(Args&&...) = delete;
Constraints: T is an array of known bound.