From Jason Turner

[unique.ptr.create]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpkb2941p6/{from.md → to.md} +26 -7
tmp/tmpkb2941p6/{from.md → to.md} RENAMED
@@ -1,27 +1,46 @@
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
 
 
1
+ #### 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
+ *Constraints:* `T` is not an array type.
 
8
 
9
  *Returns:* `unique_ptr<T>(new T(std::forward<Args>(args)...))`.
10
 
11
  ``` cpp
12
  template<class T> unique_ptr<T> make_unique(size_t n);
13
  ```
14
 
15
+ *Constraints:* `T` is an array of unknown bound.
 
16
 
17
  *Returns:* `unique_ptr<T>(new remove_extent_t<T>[n]())`.
18
 
19
  ``` cpp
20
  template<class T, class... Args> unspecified make_unique(Args&&...) = delete;
21
  ```
22
 
23
+ *Constraints:* `T` is an array of known bound.
24
+
25
+ ``` cpp
26
+ template<class T> unique_ptr<T> make_unique_for_overwrite();
27
+ ```
28
+
29
+ *Constraints:* `T` is not an array type.
30
+
31
+ *Returns:* `unique_ptr<T>(new T)`.
32
+
33
+ ``` cpp
34
+ template<class T> unique_ptr<T> make_unique_for_overwrite(size_t n);
35
+ ```
36
+
37
+ *Constraints:* `T` is an array of unknown bound.
38
+
39
+ *Returns:* `unique_ptr<T>(new remove_extent_t<T>[n])`.
40
+
41
+ ``` cpp
42
+ template<class T, class... Args> unspecified make_unique_for_overwrite(Args&&...) = delete;
43
+ ```
44
+
45
+ *Constraints:* `T` is an array of known bound.
46