beman::optional::operator>=

Greater-than-or-equal operators

Synopses

Declared in <beman/optional/optional.hpp>

Orders two optionals with greater-than-or-equal.

template<
    typename T,
    typename U>
constexpr
bool
operator>=(
    optional<T> const& lhs,
    optional<U> const& rhs)
requires detail::optional_ge_rel<T, U>;
» more...

Orders an optional after or equal to a value.

template<
    typename T,
    typename U>
constexpr
bool
operator>=(
    optional<T> const& lhs,
    U const& rhs)
requires (!detail::is_optional<U>) && detail::optional_ge_rel<T, U>;
» more...

Orders a value after or equal to an optional.

template<
    typename T,
    typename U>
constexpr
bool
operator>=(
    T const& lhs,
    optional<U> const& rhs)
requires (!detail::is_optional<T>) && detail::optional_ge_rel<T, U>;
» more...

Return Value

  • true if lhs does not order before rhs.
  • true if lhs is engaged and its contained value does not order before rhs.
  • true if rhs is disengaged, or lhs does not order before its contained value.

Parameters

NameDescription
lhsThe left-hand optional.
rhsThe right-hand optional.