llvm::operator==

Compare fallible iterators for equality.

Synopsis

Declared in <llvm/ADT/fallible_iterator.h>

bool
operator==(
    fallible_iterator const& LHS,
    fallible_iterator const& RHS);

NOTE

This function is a hidden friend of fallible_iterator, declared only inside that class: it can be found only through argument-dependent lookup.

Description

Returns true if both LHS and RHS are end-of-range values, or if both are non-end-of-range values whose underlying iterator values compare equal.

If this is a comparison between an end-of-range iterator and a non-end-of-range iterator, then the Error (referenced by the non-end-of-range value) is marked as checked: Since all increment/decrement operations result in an end-of-range value, comparing false against end-of-range is equivalent to checking that the Error value is success. This flag management enables early returns from loop bodies without redundant Error checks.

Return Value

True if both are end values, or both are non-end values whose underlying iterators compare equal

Parameters

NameDescription
LHSleft-hand fallible iterator
RHSright-hand fallible iterator