[unique.ptr.create]

# 20 Memory management library [[mem]](./#mem)

## 20.3 Smart pointers [[smartptr]](smartptr#unique.ptr.create)

### 20.3.1 Unique-ownership pointers [[unique.ptr]](unique.ptr#create)

#### 20.3.1.5 Creation [unique.ptr.create]

[ð](#lib:make_unique)

`template<class T, class... Args> constexpr unique_ptr<T> make_unique(Args&&... args);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3138)

*Constraints*: T is not an array type[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3142)

*Returns*: unique_ptr<T>(new T(std​::​forward<Args>(args)...))[.](#2.sentence-1)

[ð](#lib:make_unique_)

`template<class T> constexpr unique_ptr<T> make_unique(size_t n);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3154)

*Constraints*: T is an array of unknown bound[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3158)

*Returns*: unique_ptr<T>(new remove_extent_t<T>[n]())[.](#4.sentence-1)

[ð](#lib:make_unique__)

`template<class T, class... Args> unspecified make_unique(Args&&...) = delete;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3170)

*Constraints*: T is an array of known bound[.](#5.sentence-1)

[ð](#lib:make_unique___)

`template<class T> constexpr unique_ptr<T> make_unique_for_overwrite();
`

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3182)

*Constraints*: T is not an array type[.](#6.sentence-1)

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3186)

*Returns*: unique_ptr<T>(new T)[.](#7.sentence-1)

[ð](#lib:make_unique____)

`template<class T> constexpr unique_ptr<T> make_unique_for_overwrite(size_t n);
`

[8](#8)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3197)

*Constraints*: T is an array of unknown bound[.](#8.sentence-1)

[9](#9)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3201)

*Returns*: unique_ptr<T>(new remove_extent_t<T>[n])[.](#9.sentence-1)

[ð](#lib:make_unique_____)

`template<class T, class... Args> unspecified make_unique_for_overwrite(Args&&...) = delete;
`

[10](#10)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3212)

*Constraints*: T is an array of known bound[.](#10.sentence-1)
