A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue4072 below:

Issue 4072: std::optional comparisons: constrain harder


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 &gt;= 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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4