From dea5274cd2c2c5956b30f8cfd53576eeef14413a Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Fri, 5 Jan 2018 08:56:59 +0000 Subject: [PATCH] Fix #10 --- tl/expected.hpp | 58 ------------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/tl/expected.hpp b/tl/expected.hpp index 1a7190a..da0fd55 100644 --- a/tl/expected.hpp +++ b/tl/expected.hpp @@ -1965,32 +1965,6 @@ constexpr bool operator!=(const expected &lhs, ? true : (!lhs.has_value() ? lhs.error() != rhs.error() : *lhs != *rhs); } -template -constexpr bool operator<(const expected &lhs, const expected &rhs) { - return (lhs.has_value() != rhs.has_value()) - ? (!lhs.has_value() ? true : false) - : (!lhs.has_value() ? lhs.error() < rhs.error() : *lhs < *rhs); -} -template -constexpr bool operator>(const expected &lhs, const expected &rhs) { - return (lhs.has_value() != rhs.has_value()) - ? (!lhs.has_value() ? false : true) - : (!lhs.has_value() ? lhs.error() > rhs.error() : *lhs > *rhs); -} -template -constexpr bool operator<=(const expected &lhs, - const expected &rhs) { - return (lhs.has_value() != rhs.has_value()) - ? (!lhs.has_value() ? false : true) - : (!lhs.has_value() ? lhs.error() <= rhs.error() : *lhs <= *rhs); -} -template -constexpr bool operator>=(const expected &lhs, - const expected &rhs) { - return (lhs.has_value() != rhs.has_value()) - ? (!lhs.has_value() ? true : false) - : (!lhs.has_value() ? lhs.error() >= rhs.error() : *lhs >= *rhs); -} template constexpr bool operator==(const expected &x, const U &v) { @@ -2008,38 +1982,6 @@ template constexpr bool operator!=(const U &v, const expected &x) { return x.has_value() ? *x != v : true; } -template -constexpr bool operator<(const expected &x, const U &v) { - return x.has_value() ? *x < v : true; -} -template -constexpr bool operator<(const U &v, const expected &x) { - return x.has_value() ? v < *x : false; -} -template -constexpr bool operator<=(const expected &x, const U &v) { - return x.has_value() ? *x <= v : true; -} -template -constexpr bool operator<=(const U &v, const expected &x) { - return x.has_value() ? v <= *x : false; -} -template -constexpr bool operator>(const expected &x, const U &v) { - return x.has_value() ? *x > v : false; -} -template -constexpr bool operator>(const U &v, const expected &x) { - return x.has_value() ? v > *x : true; -} -template -constexpr bool operator>=(const expected &x, const U &v) { - return x.has_value() ? *x >= v : false; -} -template -constexpr bool operator>=(const U &v, const expected &x) { - return x.has_value() ? v >= *x : true; -} template constexpr bool operator==(const expected &x, const unexpected &e) {