Lines Matching defs:lhs
691 bool operator==(const Optional<T>& lhs, const Optional<U>& rhs) {
692 if (lhs.has_value() != rhs.has_value()) return false;
693 if (!lhs.has_value()) return true;
694 return *lhs == *rhs;
698 bool operator!=(const Optional<T>& lhs, const Optional<U>& rhs) {
699 if (lhs.has_value() != rhs.has_value()) return true;
700 if (!lhs.has_value()) return false;
701 return *lhs != *rhs;
705 bool operator<(const Optional<T>& lhs, const Optional<U>& rhs) {
707 if (!lhs.has_value()) return true;
708 return *lhs < *rhs;
712 bool operator<=(const Optional<T>& lhs, const Optional<U>& rhs) {
713 if (!lhs.has_value()) return true;
715 return *lhs <= *rhs;
719 bool operator>(const Optional<T>& lhs, const Optional<U>& rhs) {
720 if (!lhs.has_value()) return false;
722 return *lhs > *rhs;
726 bool operator>=(const Optional<T>& lhs, const Optional<U>& rhs) {
728 if (!lhs.has_value()) return false;
729 return *lhs >= *rhs;
875 swap(Optional<T>& lhs, Optional<T>& rhs) {
876 lhs.swap(rhs);