folly::operator<

Less-than operators

Synopses

Declared in <folly/Expected.h>

Deleted to forbid ordering an Optional against a bare value.

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

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);
» more...

Less-than 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 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...

Compares two tapes lexicographically.

bool
operator<(
    tape const& x,
    tape const& y);
» more...

Compares two huge page sizes by their size in bytes.

bool
operator<(
    HugePageSize const& a,
    HugePageSize const& b);
» more...

Orders keys by level, then by option name.

bool
operator<(
    SocketOptionKey const& lhs,
    SocketOptionKey const& rhs);
» more...

Orders two dynamics.

bool
operator<(
    dynamic const& a,
    dynamic const& b);
» more...

Order two iterators by position.

bool
operator<(
    down const lhs,
    down const rhs) noexcept;
» more...

Orders None against an Optional; None sorts before any value.

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

Orders an Optional against None; nothing sorts before None.

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

Deleted to forbid ordering a bare value against an Optional.

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

Orders two views lexicographically.

bool
operator<(
    self lhs,
    self rhs) noexcept;
» more...

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);
» more...

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;
» more...

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;
» more...

Orders two Expected values, treating errors as less than values.

template<
    class Value,
    class Error>
bool
operator<(
    Expected<Value, Error> const& lhs,
    Expected<Value, Error> const& rhs)
requires IsLessThanComparable<Value>::value;
» more...

Orders two Expected values, treating errors as less than values.

bool
operator<(
    Expected<Val, Err> const& lhs,
    Expected<Val, Err> const& rhs)
requires IsLessThanComparable<Val>::value;
» more...

Returns true if x is ordered before y.

constexpr
bool
operator<(
    index_iterator const& x,
    index_iterator const& y);
» more...

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;
» more...

Test whether one range is lexicographically less than another.

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

Orders a std::basic_string 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);
» more...

Orders an fbstring 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);
» more...

Return Value

  • true if _this orders before that.
  • true if x is less than y.
  • True if a is smaller than b.
  • true if lhs orders before rhs.
  • True if a orders before b.
  • true if lhs precedes rhs.
  • true if a has a value.
  • false always.
  • True if lhs compares less than rhs.
  • true if a orders before b.
  • Never returns; this overload is deleted.
  • True if x precedes y.
  • True if lhs is less than rhs as StringPiece.
  • True if lhs is less than rhs.
  • true if lhs is lexicographically less than rhs.

Parameters

NameDescription
_thisThe left-hand operand.
thatThe right-hand operand.
xThe left-hand tape.
yThe right-hand tape.
aThe left-hand huge page size.
bThe right-hand huge page size.
lhsThe left-hand key to compare.
rhsThe right-hand key to compare.
noneThe None tag.
otherThe value operand.
expThe Expected operand.