Less‐than‐or‐equal operators

Synopses

Declared in <folly/memory/not_null.h>

Orders a std::basic_string at or before an fbstring.

template<
    typename E,
    class T,
    class A,
    class S,
    class A2>
bool
operator<=(
    std::basic_string<E, T, A2> const& lhs,
    basic_fbstring<E, T, A, S> const& rhs);

Orders two Poly objects.

template<
    class I1,
    class I2>
requires detail::Orderable<I1, I2>::value
bool
operator<=(
    Poly<I1> const& _this,
    Poly<I2> const& that);

Less‐than‐or‐equal comparison forwarding to the underlying pointer.

template<
    typename PtrT,
    typename T,
    typename RhsNullHandlerT>
bool
operator<=(
    T const& lhs,
    not_null<PtrT, RhsNullHandlerT> const& rhs);

[» more...]

Less‐than‐or‐equal comparison forwarding to the underlying pointer.

template<
    typename PtrT,
    typename T,
    typename LhsNullHandlerT>
bool
operator<=(
    not_null<PtrT, LhsNullHandlerT> const& lhs,
    T const& rhs);

[» more...]

Less‐than‐or‐equal comparison.

bool
operator<=(
    dynamic const& a,
    dynamic const& b);

Compares two tapes lexicographically.

bool
operator<=(
    tape const& x,
    tape const& y);

Order two iterators by position.

bool
operator<=(
    down const lhs,
    down const rhs) noexcept;

Returns true if x is ordered before or equal to y.

constexpr
bool
operator<=(
    index_iterator const& x,
    index_iterator const& y);

operator<= through conversion for Range<const char*>

template<
    class T,
    class U>
bool
operator<=(
    T const& lhs,
    U const& rhs)
requires detail::ComparableAsStringPiece<T, U>::value;

Test whether one range is lexicographically less than or equal to another.

template<class Iter>
bool
operator<=(
    Range<Iter> const& lhs,
    Range<Iter> const& rhs);

Orders two Optionals; an empty Optional sorts before any value.

template<
    class U,
    class V>
constexpr
bool
operator<=(
    Optional<U> const& a,
    Optional<V> const& b);

Orders an fbstring at or before a std::basic_string.

template<
    typename E,
    class T,
    class A,
    class S,
    class A2>
bool
operator<=(
    basic_fbstring<E, T, A, S> const& lhs,
    std::basic_string<E, T, A2> const& rhs);

Orders two views lexicographically.

bool
operator<=(
    self lhs,
    self rhs) noexcept;

Deleted: comparing a bare value with an Expected is not allowed.

template<
    class Value,
    class Error>
bool
operator<=(
    Value const& other,
    Expected<Value, Error> const& exp) = delete;

Deleted: comparing an Expected with a bare value is not allowed.

template<
    class Value,
    class Error>
bool
operator<=(
    Expected<Value, Error> const& exp,
    Value const& other) = delete;

Orders two Expected values.

template<
    class Value,
    class Error,
    bool FollyRequires1942 = false>
bool
operator<=(
    Expected<Value, Error> const& lhs,
    Expected<Value, Error> const& rhs);

Orders an Optional against None.

template<class V>
constexpr
bool
operator<=(
    Optional<V> const& a,
    None none) noexcept;

Orders None against an Optional; None never sorts after a value.

template<class V>
constexpr
bool
operator<=(
    None none,
    Optional<V> const& a) noexcept;

Deleted to forbid ordering a bare value against an Optional.

template<class V>
bool
operator<=(
    V const& other,
    Optional<V> const& a) = delete;

Deleted to forbid ordering an Optional against a bare value.

template<class V>
bool
operator<=(
    Optional<V> const& a,
    V const& other) = delete;

Return Value

  • true if lhs is not greater than rhs.

  • true if _this does not order after that.

  • True if a does not order after b.

  • true if x is less than or equal to y.

  • true if lhs does not follow rhs.

  • True if x does not follow y.

  • True if lhs is less than or equal to rhs as StringPiece.

  • True if lhs is less than or equal to rhs.

  • true if a does not order after b.

  • True if lhs compares less than or equal to rhs.

  • Never returns; this overload is deleted.

  • true if lhs does not order after rhs.

  • true if a has no value.

  • true always.

Parameters

Name

Description

lhs

The left‐hand standard string.

rhs

The right‐hand fbstring.

_this

The left‐hand operand.

that

The right‐hand operand.

a

The left‐hand dynamic.

b

The right‐hand dynamic.

x

The left‐hand tape.

y

The right‐hand tape.

other

The value operand.

exp

The Expected operand.

none

The None tag.

Created with MrDocs