tmp/tmpqnkowdbq/{from.md → to.md}
RENAMED
|
@@ -1,14 +1,15 @@
|
|
| 1 |
-
#####
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class U> explicit unique_ptr(U p) noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
This constructor behaves the same as the constructor in the primary
|
| 8 |
-
template that takes a single parameter of type `pointer`
|
| 9 |
-
|
|
|
|
| 10 |
|
| 11 |
- `U` is the same type as `pointer`, or
|
| 12 |
- `pointer` is the same type as `element_type*`, `U` is a pointer type
|
| 13 |
`V*`, and `V(*)[]` is convertible to `element_type(*)[]`.
|
| 14 |
|
|
@@ -16,33 +17,32 @@ additionally shall not participate in overload resolution unless
|
|
| 16 |
template<class U> unique_ptr(U p, see below d) noexcept;
|
| 17 |
template<class U> unique_ptr(U p, see below d) noexcept;
|
| 18 |
```
|
| 19 |
|
| 20 |
These constructors behave the same as the constructors in the primary
|
| 21 |
-
template that take a parameter of type `pointer` and a second parameter
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
| 25 |
- `U` is the same type as `pointer`,
|
| 26 |
- `U` is `nullptr_t`, or
|
| 27 |
- `pointer` is the same type as `element_type*`, `U` is a pointer type
|
| 28 |
`V*`, and `V(*)[]` is convertible to `element_type(*)[]`.
|
| 29 |
|
| 30 |
``` cpp
|
| 31 |
-
template
|
| 32 |
-
unique_ptr(unique_ptr<U, E>&& u) noexcept;
|
| 33 |
```
|
| 34 |
|
| 35 |
-
This constructor behaves the same as in the primary template
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
- `U` is an array type, and
|
| 40 |
- `pointer` is the same type as `element_type*`, and
|
| 41 |
- `UP::pointer` is the same type as `UP::element_type*`, and
|
| 42 |
- `UP::element_type(*)[]` is convertible to `element_type(*)[]`, and
|
| 43 |
- either `D` is a reference type and `E` is the same type as `D`, or `D`
|
| 44 |
is not a reference type and `E` is implicitly convertible to `D`.
|
| 45 |
|
| 46 |
-
[*Note 1*: This replaces the
|
| 47 |
-
primary template — *end note*]
|
| 48 |
|
|
|
|
| 1 |
+
##### Constructors <a id="unique.ptr.runtime.ctor">[[unique.ptr.runtime.ctor]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template<class U> explicit unique_ptr(U p) noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
This constructor behaves the same as the constructor in the primary
|
| 8 |
+
template that takes a single parameter of type `pointer`.
|
| 9 |
+
|
| 10 |
+
*Constraints:*
|
| 11 |
|
| 12 |
- `U` is the same type as `pointer`, or
|
| 13 |
- `pointer` is the same type as `element_type*`, `U` is a pointer type
|
| 14 |
`V*`, and `V(*)[]` is convertible to `element_type(*)[]`.
|
| 15 |
|
|
|
|
| 17 |
template<class U> unique_ptr(U p, see below d) noexcept;
|
| 18 |
template<class U> unique_ptr(U p, see below d) noexcept;
|
| 19 |
```
|
| 20 |
|
| 21 |
These constructors behave the same as the constructors in the primary
|
| 22 |
+
template that take a parameter of type `pointer` and a second parameter.
|
| 23 |
+
|
| 24 |
+
*Constraints:*
|
| 25 |
|
| 26 |
- `U` is the same type as `pointer`,
|
| 27 |
- `U` is `nullptr_t`, or
|
| 28 |
- `pointer` is the same type as `element_type*`, `U` is a pointer type
|
| 29 |
`V*`, and `V(*)[]` is convertible to `element_type(*)[]`.
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
+
template<class U, class E> unique_ptr(unique_ptr<U, E>&& u) noexcept;
|
|
|
|
| 33 |
```
|
| 34 |
|
| 35 |
+
This constructor behaves the same as in the primary template.
|
| 36 |
+
|
| 37 |
+
*Constraints:* Where `UP` is `unique_ptr<U, E>`:
|
| 38 |
|
| 39 |
- `U` is an array type, and
|
| 40 |
- `pointer` is the same type as `element_type*`, and
|
| 41 |
- `UP::pointer` is the same type as `UP::element_type*`, and
|
| 42 |
- `UP::element_type(*)[]` is convertible to `element_type(*)[]`, and
|
| 43 |
- either `D` is a reference type and `E` is the same type as `D`, or `D`
|
| 44 |
is not a reference type and `E` is implicitly convertible to `D`.
|
| 45 |
|
| 46 |
+
[*Note 1*: This replaces the *Constraints:* specification of the
|
| 47 |
+
primary template. — *end note*]
|
| 48 |
|