| 85 | } |
| 86 | |
| 87 | constexpr ComparisonResult DoubleCompare(double a, double b) { |
| 88 | // constexpr friendly isnan check. |
| 89 | if (!(a == a) || !(b == b)) { |
| 90 | return ComparisonResult::kNanInequal; |
| 91 | } |
| 92 | return Compare(a, b); |
| 93 | } |
| 94 | |
| 95 | // Implement generic numeric comparison against double value. |
| 96 | struct DoubleCompareVisitor { |