mirror of
https://github.com/TartanLlama/expected.git
synced 2025-08-02 10:24:31 +02:00
Merge branch 'master' of github.com:TartanLlama/expected
This commit is contained in:
@@ -1965,32 +1965,6 @@ constexpr bool operator!=(const expected<T, E> &lhs,
|
||||
? true
|
||||
: (!lhs.has_value() ? lhs.error() != rhs.error() : *lhs != *rhs);
|
||||
}
|
||||
template <class T, class E, class U, class F>
|
||||
constexpr bool operator<(const expected<T, E> &lhs, const expected<U, F> &rhs) {
|
||||
return (lhs.has_value() != rhs.has_value())
|
||||
? (!lhs.has_value() ? true : false)
|
||||
: (!lhs.has_value() ? lhs.error() < rhs.error() : *lhs < *rhs);
|
||||
}
|
||||
template <class T, class E, class U, class F>
|
||||
constexpr bool operator>(const expected<T, E> &lhs, const expected<U, F> &rhs) {
|
||||
return (lhs.has_value() != rhs.has_value())
|
||||
? (!lhs.has_value() ? false : true)
|
||||
: (!lhs.has_value() ? lhs.error() > rhs.error() : *lhs > *rhs);
|
||||
}
|
||||
template <class T, class E, class U, class F>
|
||||
constexpr bool operator<=(const expected<T, E> &lhs,
|
||||
const expected<U, F> &rhs) {
|
||||
return (lhs.has_value() != rhs.has_value())
|
||||
? (!lhs.has_value() ? false : true)
|
||||
: (!lhs.has_value() ? lhs.error() <= rhs.error() : *lhs <= *rhs);
|
||||
}
|
||||
template <class T, class E, class U, class F>
|
||||
constexpr bool operator>=(const expected<T, E> &lhs,
|
||||
const expected<U, F> &rhs) {
|
||||
return (lhs.has_value() != rhs.has_value())
|
||||
? (!lhs.has_value() ? true : false)
|
||||
: (!lhs.has_value() ? lhs.error() >= rhs.error() : *lhs >= *rhs);
|
||||
}
|
||||
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator==(const expected<T, E> &x, const U &v) {
|
||||
@@ -2008,38 +1982,6 @@ template <class T, class E, class U>
|
||||
constexpr bool operator!=(const U &v, const expected<T, E> &x) {
|
||||
return x.has_value() ? *x != v : true;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator<(const expected<T, E> &x, const U &v) {
|
||||
return x.has_value() ? *x < v : true;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator<(const U &v, const expected<T, E> &x) {
|
||||
return x.has_value() ? v < *x : false;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator<=(const expected<T, E> &x, const U &v) {
|
||||
return x.has_value() ? *x <= v : true;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator<=(const U &v, const expected<T, E> &x) {
|
||||
return x.has_value() ? v <= *x : false;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator>(const expected<T, E> &x, const U &v) {
|
||||
return x.has_value() ? *x > v : false;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator>(const U &v, const expected<T, E> &x) {
|
||||
return x.has_value() ? v > *x : true;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator>=(const expected<T, E> &x, const U &v) {
|
||||
return x.has_value() ? *x >= v : false;
|
||||
}
|
||||
template <class T, class E, class U>
|
||||
constexpr bool operator>=(const U &v, const expected<T, E> &x) {
|
||||
return x.has_value() ? v >= *x : true;
|
||||
}
|
||||
|
||||
template <class T, class E>
|
||||
constexpr bool operator==(const expected<T, E> &x, const unexpected<E> &e) {
|
||||
|
Reference in New Issue
Block a user