From Jason Turner

[unique.ptr.runtime.asgn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpncw4xz3u/{from.md → to.md} +20 -0
tmp/tmpncw4xz3u/{from.md → to.md} RENAMED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### `unique_ptr` assignment <a id="unique.ptr.runtime.asgn">[[unique.ptr.runtime.asgn]]</a>
2
+
3
+ ``` cpp
4
+ template <class U, class E>
5
+ unique_ptr& operator=(unique_ptr<U, E>&& u)noexcept;
6
+ ```
7
+
8
+ This operator behaves the same as in the primary template, except that
9
+ it shall not participate in overload resolution unless all of the
10
+ following conditions hold, where `UP` is `unique_ptr<U, E>`:
11
+
12
+ - `U` is an array type, and
13
+ - `pointer` is the same type as `element_type*`, and
14
+ - `UP::pointer` is the same type as `UP::element_type*`, and
15
+ - `UP::element_type(*)[]` is convertible to `element_type(*)[]`, and
16
+ - `is_assignable_v<D&, E&&>` is `true`.
17
+
18
+ [*Note 2*: This replaces the overload-resolution specification of the
19
+ primary template — *end note*]
20
+