23 General utilities library [utilities]

23.6 Optional objects [optional]

23.6.7 Comparison with nullopt [optional.nullops]

template<class T> constexpr bool operator==(const optional<T>& x, nullopt_t) noexcept; template<class T> constexpr bool operator==(nullopt_t, const optional<T>& x) noexcept;
Returns: !x.
template<class T> constexpr bool operator!=(const optional<T>& x, nullopt_t) noexcept; template<class T> constexpr bool operator!=(nullopt_t, const optional<T>& x) noexcept;
Returns: bool(x).
template<class T> constexpr bool operator<(const optional<T>& x, nullopt_t) noexcept;
Returns: false.
template<class T> constexpr bool operator<(nullopt_t, const optional<T>& x) noexcept;
Returns: bool(x).
template<class T> constexpr bool operator<=(const optional<T>& x, nullopt_t) noexcept;
Returns: !x.
template<class T> constexpr bool operator<=(nullopt_t, const optional<T>& x) noexcept;
Returns: true.
template<class T> constexpr bool operator>(const optional<T>& x, nullopt_t) noexcept;
Returns: bool(x).
template<class T> constexpr bool operator>(nullopt_t, const optional<T>& x) noexcept;
Returns: false.
template<class T> constexpr bool operator>=(const optional<T>& x, nullopt_t) noexcept;
Returns: true.
template<class T> constexpr bool operator>=(nullopt_t, const optional<T>& x) noexcept;
Returns: !x.