Return whether the left‐hand operand is ordered after the right.

Synopsis

Declared in <bslstl_optional.h>

template<
    class t_LHS_TYPE,
    class t_RHS_TYPE>
constexpr
bool
operator>(
    bsl::optional<t_LHS_TYPE> const& lhs,
    bsl::optional<t_RHS_TYPE> const& rhs);

Description

Return true if the specified lhs optional object is ordered after the specified rhs optional object, and false otherwise. lhs is ordered after rhs if lhs is engaged and rhs is disengaged or if both are engaged and lhs.value() is ordered after rhs.value(). This function can be called in constant expressions only if neither t_LHS_TYPE nor t_RHS_TYPE is allocator‐aware.

Return Value

true if lhs is ordered after rhs, and false otherwise

Parameters

Name

Description

lhs

left‐hand operand

rhs

right‐hand operand

Created with MrDocs