From Jason Turner

[expected.void.eq]

Diff to HTML by rtfpessoa

tmp/tmpe_z6cfff/{from.md → to.md} RENAMED
@@ -3,22 +3,22 @@
3
  ``` cpp
4
  template<class T2, class E2> requires is_void_v<T2>
5
  friend constexpr bool operator==(const expected& x, const expected<T2, E2>& y);
6
  ```
7
 
8
- *Mandates:* The expression `x.error() == y.error()` is well-formed and
9
- its result is convertible to `bool`.
10
 
11
  *Returns:* If `x.has_value()` does not equal `y.has_value()`, `false`;
12
  otherwise `x.has_value() || static_cast<bool>(x.error() == y.error())`.
13
 
14
  ``` cpp
15
  template<class E2>
16
  friend constexpr bool operator==(const expected& x, const unexpected<E2>& e);
17
  ```
18
 
19
- *Mandates:* The expression `x.error() == e.error()` is well-formed and
20
- its result is convertible to `bool`.
21
 
22
  *Returns:*
23
  `!x.has_value() && static_cast<bool>(x.error() == e.error())`.
24
 
 
3
  ``` cpp
4
  template<class T2, class E2> requires is_void_v<T2>
5
  friend constexpr bool operator==(const expected& x, const expected<T2, E2>& y);
6
  ```
7
 
8
+ *Constraints:* The expression `x.error() == y.error()` is well-formed
9
+ and its result is convertible to `bool`.
10
 
11
  *Returns:* If `x.has_value()` does not equal `y.has_value()`, `false`;
12
  otherwise `x.has_value() || static_cast<bool>(x.error() == y.error())`.
13
 
14
  ``` cpp
15
  template<class E2>
16
  friend constexpr bool operator==(const expected& x, const unexpected<E2>& e);
17
  ```
18
 
19
+ *Constraints:* The expression `x.error() == e.error()` is well-formed
20
+ and its result is convertible to `bool`.
21
 
22
  *Returns:*
23
  `!x.has_value() && static_cast<bool>(x.error() == e.error())`.
24