Issue 4072: std::optional comparisons: constrain harder (original) (raw)
template<class T, class U> constexpr bool operator==(const optional<T>& x, const U& v);
-1-Constraints:U is not a specialization of optional.The expression *x == v is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator==(const T& v, const optional<U>& x);
-3-Constraints:T is not a specialization of optional.The expression v == *x is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator!=(const optional<T>& x, const U& v);
-5-Constraints:U is not a specialization of optional.The expression *x != v is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator!=(const T& v, const optional<U>& x);
-7-Constraints:T is not a specialization of optional.The expression v != *x is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator<(const optional<T>& x, const U& v);
-9-Constraints:U is not a specialization of optional.The expression *x < v is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator<(const T& v, const optional<U>& x);
-11-Constraints:T is not a specialization of optional.The expression v < *x is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator>(const optional<T>& x, const U& v);
-13-Constraints:U is not a specialization of optional.The expression *x > v is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator>(const T& v, const optional<U>& x);
-15-Constraints:T is not a specialization of optional.The expression v > *x is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator<=(const optional<T>& x, const U& v);
-17-Constraints:U is not a specialization of optional.The expression *x <= v is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator<=(const T& v, const optional<U>& x);
-19-Constraints:T is not a specialization of optional.The expression v <= *x is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator>=(const optional<T>& x, const U& v);
-21-Constraints:U is not a specialization of optional.The expression *x >= v is well-formed and its result is convertible to bool.
template<class T, class U> constexpr bool operator>=(const T& v, const optional<U>& x);
-23-Constraints:T is not a specialization of optional.The expression v >= *x is well-formed and its result is convertible to bool.