From Jason Turner

[variant.monostate.relops]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpnybjusxc/{from.md → to.md} +14 -0
tmp/tmpnybjusxc/{from.md → to.md} RENAMED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### `monostate` relational operators <a id="variant.monostate.relops">[[variant.monostate.relops]]</a>
2
+
3
+ ``` cpp
4
+ constexpr bool operator<(monostate, monostate) noexcept { return false; }
5
+ constexpr bool operator>(monostate, monostate) noexcept { return false; }
6
+ constexpr bool operator<=(monostate, monostate) noexcept { return true; }
7
+ constexpr bool operator>=(monostate, monostate) noexcept { return true; }
8
+ constexpr bool operator==(monostate, monostate) noexcept { return true; }
9
+ constexpr bool operator!=(monostate, monostate) noexcept { return false; }
10
+ ```
11
+
12
+ [*Note 1*: `monostate` objects have only a single state; they thus
13
+ always compare equal. — *end note*]
14
+