From Jason Turner

[unique.ptr.dltr]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpl4965dow/{from.md → to.md} +18 -6
tmp/tmpl4965dow/{from.md → to.md} RENAMED
@@ -32,29 +32,41 @@ unless `U*` is implicitly convertible to `T*`.
32
 
33
  ``` cpp
34
  void operator()(T* ptr) const;
35
  ```
36
 
37
- *Effects:* calls `delete` on `ptr`.
38
 
39
  *Remarks:* If `T` is an incomplete type, the program is ill-formed.
40
 
41
  ##### `default_delete<T[]>` <a id="unique.ptr.dltr.dflt1">[[unique.ptr.dltr.dflt1]]</a>
42
 
43
  ``` cpp
44
  namespace std {
45
  template <class T> struct default_delete<T[]> {
46
  constexpr default_delete() noexcept = default;
47
- void operator()(T*) const;
48
- template <class U> void operator()(U*) const = delete;
49
  };
50
  }
51
  ```
52
 
53
  ``` cpp
54
- void operator()(T* ptr) const;
55
  ```
56
 
57
- *Effects:* calls `delete[]` on `ptr`.
 
58
 
59
- *Remarks:* If T is an incomplete type, the program is ill-formed.
 
 
 
 
 
 
 
 
 
 
 
60
 
 
32
 
33
  ``` cpp
34
  void operator()(T* ptr) const;
35
  ```
36
 
37
+ *Effects:* Calls `delete` on `ptr`.
38
 
39
  *Remarks:* If `T` is an incomplete type, the program is ill-formed.
40
 
41
  ##### `default_delete<T[]>` <a id="unique.ptr.dltr.dflt1">[[unique.ptr.dltr.dflt1]]</a>
42
 
43
  ``` cpp
44
  namespace std {
45
  template <class T> struct default_delete<T[]> {
46
  constexpr default_delete() noexcept = default;
47
+ template <class U> default_delete(const default_delete<U[]>&) noexcept;
48
+ template <class U> void operator()(U* ptr) const;
49
  };
50
  }
51
  ```
52
 
53
  ``` cpp
54
+ template <class U> default_delete(const default_delete<U[]>& other) noexcept;
55
  ```
56
 
57
+ *Effects:* constructs a `default_delete` object from another
58
+ `default_delete<U[]>` object.
59
 
60
+ *Remarks:* This constructor shall not participate in overload resolution
61
+ unless `U(*)[]` is convertible to `T(*)[]`.
62
+
63
+ ``` cpp
64
+ template <class U> void operator()(U* ptr) const;
65
+ ```
66
+
67
+ *Effects:* Calls `delete[]` on `ptr`.
68
+
69
+ *Remarks:* If `U` is an incomplete type, the program is ill-formed. This
70
+ function shall not participate in overload resolution unless `U(*)[]` is
71
+ convertible to `T(*)[]`.
72