tmp/tmpl0ngly13/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### `unique_ptr` creation <a id="unique.ptr.create">[[unique.ptr.create]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template <class T, class... Args> unique_ptr<T> make_unique(Args&&... args);
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Remarks:* This function shall not participate in overload resolution
|
| 8 |
+
unless `T` is not an array.
|
| 9 |
+
|
| 10 |
+
*Returns:* `unique_ptr<T>(new T(std::forward<Args>(args)...))`.
|
| 11 |
+
|
| 12 |
+
``` cpp
|
| 13 |
+
template <class T> unique_ptr<T> make_unique(size_t n);
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
*Remarks:* This function shall not participate in overload resolution
|
| 17 |
+
unless `T` is an array of unknown bound.
|
| 18 |
+
|
| 19 |
+
*Returns:* `unique_ptr<T>(new remove_extent_t<T>[n]())`.
|
| 20 |
+
|
| 21 |
+
``` cpp
|
| 22 |
+
template <class T, class... Args> unspecified make_unique(Args&&...) = delete;
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
*Remarks:* This function shall not participate in overload resolution
|
| 26 |
+
unless `T` is an array of known bound.
|
| 27 |
+
|