From Jason Turner

[expected.object.obs]

Diff to HTML by rtfpessoa

tmp/tmp9cxq0_qt/{from.md → to.md} RENAMED
@@ -3,29 +3,29 @@
3
  ``` cpp
4
  constexpr const T* operator->() const noexcept;
5
  constexpr T* operator->() noexcept;
6
  ```
7
 
8
- *Preconditions:* `has_value()` is `true`.
9
 
10
  *Returns:* `addressof(`*`val`*`)`.
11
 
12
  ``` cpp
13
  constexpr const T& operator*() const & noexcept;
14
  constexpr T& operator*() & noexcept;
15
  ```
16
 
17
- *Preconditions:* `has_value()` is `true`.
18
 
19
  *Returns:* *val*.
20
 
21
  ``` cpp
22
  constexpr T&& operator*() && noexcept;
23
  constexpr const T&& operator*() const && noexcept;
24
  ```
25
 
26
- *Preconditions:* `has_value()` is `true`.
27
 
28
  *Returns:* `std::move(`*`val`*`)`.
29
 
30
  ``` cpp
31
  constexpr explicit operator bool() const noexcept;
@@ -62,34 +62,34 @@ constexpr const T&& value() const &&;
62
  ``` cpp
63
  constexpr const E& error() const & noexcept;
64
  constexpr E& error() & noexcept;
65
  ```
66
 
67
- *Preconditions:* `has_value()` is `false`.
68
 
69
  *Returns:* *unex*.
70
 
71
  ``` cpp
72
  constexpr E&& error() && noexcept;
73
  constexpr const E&& error() const && noexcept;
74
  ```
75
 
76
- *Preconditions:* `has_value()` is `false`.
77
 
78
  *Returns:* `std::move(`*`unex`*`)`.
79
 
80
  ``` cpp
81
- template<class U> constexpr T value_or(U&& v) const &;
82
  ```
83
 
84
  *Mandates:* `is_copy_constructible_v<T>` is `true` and
85
  `is_convertible_v<U, T>` is `true`.
86
 
87
  *Returns:* `has_value() ? **this : static_cast<T>(std::forward<U>(v))`.
88
 
89
  ``` cpp
90
- template<class U> constexpr T value_or(U&& v) &&;
91
  ```
92
 
93
  *Mandates:* `is_move_constructible_v<T>` is `true` and
94
  `is_convertible_v<U, T>` is `true`.
95
 
 
3
  ``` cpp
4
  constexpr const T* operator->() const noexcept;
5
  constexpr T* operator->() noexcept;
6
  ```
7
 
8
+ `has_value()` is `true`.
9
 
10
  *Returns:* `addressof(`*`val`*`)`.
11
 
12
  ``` cpp
13
  constexpr const T& operator*() const & noexcept;
14
  constexpr T& operator*() & noexcept;
15
  ```
16
 
17
+ `has_value()` is `true`.
18
 
19
  *Returns:* *val*.
20
 
21
  ``` cpp
22
  constexpr T&& operator*() && noexcept;
23
  constexpr const T&& operator*() const && noexcept;
24
  ```
25
 
26
+ `has_value()` is `true`.
27
 
28
  *Returns:* `std::move(`*`val`*`)`.
29
 
30
  ``` cpp
31
  constexpr explicit operator bool() const noexcept;
 
62
  ``` cpp
63
  constexpr const E& error() const & noexcept;
64
  constexpr E& error() & noexcept;
65
  ```
66
 
67
+ `has_value()` is `false`.
68
 
69
  *Returns:* *unex*.
70
 
71
  ``` cpp
72
  constexpr E&& error() && noexcept;
73
  constexpr const E&& error() const && noexcept;
74
  ```
75
 
76
+ `has_value()` is `false`.
77
 
78
  *Returns:* `std::move(`*`unex`*`)`.
79
 
80
  ``` cpp
81
+ template<class U = remove_cv_t<T>> constexpr T value_or(U&& v) const &;
82
  ```
83
 
84
  *Mandates:* `is_copy_constructible_v<T>` is `true` and
85
  `is_convertible_v<U, T>` is `true`.
86
 
87
  *Returns:* `has_value() ? **this : static_cast<T>(std::forward<U>(v))`.
88
 
89
  ``` cpp
90
+ template<class U = remove_cv_t<T>> constexpr T value_or(U&& v) &&;
91
  ```
92
 
93
  *Mandates:* `is_move_constructible_v<T>` is `true` and
94
  `is_convertible_v<U, T>` is `true`.
95