tmp/tmpr05qcwid/{from.md → to.md}
RENAMED
|
@@ -45,10 +45,16 @@ namespace std {
|
|
| 45 |
unique_ptr& operator=(const unique_ptr&) = delete;
|
| 46 |
};
|
| 47 |
}
|
| 48 |
```
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
The default type for the template parameter `D` is `default_delete`. A
|
| 51 |
client-supplied template argument `D` shall be a function object type
|
| 52 |
[[function.objects]], lvalue reference to function, or lvalue reference
|
| 53 |
to function object type for which, given a value `d` of type `D` and a
|
| 54 |
value `ptr` of type `unique_ptr<T, D>::pointer`, the expression `d(ptr)`
|
|
|
|
| 45 |
unique_ptr& operator=(const unique_ptr&) = delete;
|
| 46 |
};
|
| 47 |
}
|
| 48 |
```
|
| 49 |
|
| 50 |
+
A program that instantiates the definition of `unique_ptr<T, D>` is
|
| 51 |
+
ill-formed if `T*` is an invalid type.
|
| 52 |
+
|
| 53 |
+
[*Note 1*: This prevents the instantiation of specializations such as
|
| 54 |
+
`unique_ptr<T&, D>` and `unique_ptr<int() const, D>`. — *end note*]
|
| 55 |
+
|
| 56 |
The default type for the template parameter `D` is `default_delete`. A
|
| 57 |
client-supplied template argument `D` shall be a function object type
|
| 58 |
[[function.objects]], lvalue reference to function, or lvalue reference
|
| 59 |
to function object type for which, given a value `d` of type `D` and a
|
| 60 |
value `ptr` of type `unique_ptr<T, D>::pointer`, the expression `d(ptr)`
|