From Jason Turner

[optional.relops]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8vkt_uxu/{from.md → to.md} +82 -0
tmp/tmp8vkt_uxu/{from.md → to.md} RENAMED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Relational operators <a id="optional.relops">[[optional.relops]]</a>
2
+
3
+ ``` cpp
4
+ template <class T, class U> constexpr bool operator==(const optional<T>& x, const optional<U>& y);
5
+ ```
6
+
7
+ *Requires:* The expression `*x == *y` shall be well-formed and its
8
+ result shall be convertible to `bool`.
9
+
10
+ [*Note 1*: `T` need not be `EqualityComparable`. — *end note*]
11
+
12
+ *Returns:* If `bool(x) != bool(y)`, `false`; otherwise if
13
+ `bool(x) == false`, `true`; otherwise `*x == *y`.
14
+
15
+ *Remarks:* Specializations of this function template for which
16
+ `*x == *y` is a core constant expression shall be constexpr functions.
17
+
18
+ ``` cpp
19
+ template <class T, class U> constexpr bool operator!=(const optional<T>& x, const optional<U>& y);
20
+ ```
21
+
22
+ *Requires:* The expression `*x != *y` shall be well-formed and its
23
+ result shall be convertible to `bool`.
24
+
25
+ *Returns:* If `bool(x) != bool(y)`, `true`; otherwise, if
26
+ `bool(x) == false`, `false`; otherwise `*x != *y`.
27
+
28
+ *Remarks:* Specializations of this function template for which
29
+ `*x != *y` is a core constant expression shall be constexpr functions.
30
+
31
+ ``` cpp
32
+ template <class T, class U> constexpr bool operator<(const optional<T>& x, const optional<U>& y);
33
+ ```
34
+
35
+ *Requires:* `*x < *y` shall be well-formed and its result shall be
36
+ convertible to `bool`.
37
+
38
+ *Returns:* If `!y`, `false`; otherwise, if `!x`, `true`; otherwise
39
+ `*x < *y`.
40
+
41
+ *Remarks:* Specializations of this function template for which `*x < *y`
42
+ is a core constant expression shall be constexpr functions.
43
+
44
+ ``` cpp
45
+ template <class T, class U> constexpr bool operator>(const optional<T>& x, const optional<U>& y);
46
+ ```
47
+
48
+ *Requires:* The expression `*x > *y` shall be well-formed and its result
49
+ shall be convertible to `bool`.
50
+
51
+ *Returns:* If `!x`, `false`; otherwise, if `!y`, `true`; otherwise
52
+ `*x > *y`.
53
+
54
+ *Remarks:* Specializations of this function template for which `*x > *y`
55
+ is a core constant expression shall be constexpr functions.
56
+
57
+ ``` cpp
58
+ template <class T, class U> constexpr bool operator<=(const optional<T>& x, const optional<U>& y);
59
+ ```
60
+
61
+ *Requires:* The expression `*x <= *y` shall be well-formed and its
62
+ result shall be convertible to `bool`.
63
+
64
+ *Returns:* If `!x`, `true`; otherwise, if `!y`, `false`; otherwise
65
+ `*x <= *y`.
66
+
67
+ *Remarks:* Specializations of this function template for which
68
+ `*x <= *y` is a core constant expression shall be constexpr functions.
69
+
70
+ ``` cpp
71
+ template <class T, class U> constexpr bool operator>=(const optional<T>& x, const optional<U>& y);
72
+ ```
73
+
74
+ *Requires:* The expression `*x >= *y` shall be well-formed and its
75
+ result shall be convertible to `bool`.
76
+
77
+ *Returns:* If `!y`, `true`; otherwise, if `!x`, `false`; otherwise
78
+ `*x >= *y`.
79
+
80
+ *Remarks:* Specializations of this function template for which
81
+ `*x >= *y` is a core constant expression shall be constexpr functions.
82
+