| 1458 | /// \group relop |
| 1459 | template <class T, class U> |
| 1460 | inline constexpr bool operator<(const optional<T>& lhs, const optional<U>& rhs) { |
| 1461 | return rhs.has_value() && (!lhs.has_value() || *lhs < *rhs); |
| 1462 | } |
| 1463 | /// \group relop |
| 1464 | template <class T, class U> |
| 1465 | inline constexpr bool operator>(const optional<T>& lhs, const optional<U>& rhs) { |