From Jason Turner

[expected.void.assign]

Diff to HTML by rtfpessoa

tmp/tmpf077biw8/{from.md → to.md} RENAMED
@@ -21,10 +21,13 @@ constexpr expected& operator=(const expected& rhs);
21
 
22
  ``` cpp
23
  constexpr expected& operator=(expected&& rhs) noexcept(see below);
24
  ```
25
 
 
 
 
26
  *Effects:*
27
 
28
  - If `this->has_value() && rhs.has_value()` is `true`, no effects.
29
  - Otherwise, if `this->has_value()` is `true`, equivalent to:
30
  ``` cpp
@@ -38,13 +41,10 @@ constexpr expected& operator=(expected&& rhs) noexcept(see below);
38
  *Returns:* `*this`.
39
 
40
  *Remarks:* The exception specification is equivalent to
41
  `is_nothrow_move_constructible_v<E> && is_nothrow_move_assignable_v<E>`.
42
 
43
- This operator is defined as deleted unless `is_move_constructible_v<E>`
44
- is `true` and `is_move_assignable_v<E>` is `true`.
45
-
46
  ``` cpp
47
  template<class G>
48
  constexpr expected& operator=(const unexpected<G>& e);
49
  template<class G>
50
  constexpr expected& operator=(unexpected<G>&& e);
 
21
 
22
  ``` cpp
23
  constexpr expected& operator=(expected&& rhs) noexcept(see below);
24
  ```
25
 
26
+ *Constraints:* `is_move_constructible_v<E>` is `true` and
27
+ `is_move_assignable_v<E>` is `true`.
28
+
29
  *Effects:*
30
 
31
  - If `this->has_value() && rhs.has_value()` is `true`, no effects.
32
  - Otherwise, if `this->has_value()` is `true`, equivalent to:
33
  ``` cpp
 
41
  *Returns:* `*this`.
42
 
43
  *Remarks:* The exception specification is equivalent to
44
  `is_nothrow_move_constructible_v<E> && is_nothrow_move_assignable_v<E>`.
45
 
 
 
 
46
  ``` cpp
47
  template<class G>
48
  constexpr expected& operator=(const unexpected<G>& e);
49
  template<class G>
50
  constexpr expected& operator=(unexpected<G>&& e);