ΒΆtemplate <typename RangeT>
iterator_range<early_inc_iterator_impl<
    detail::IterOfRange<RangeT>>>
make_early_inc_range(RangeT&& Range)

Description

Make a range that does early increment to allow mutation of the underlying range without disrupting iteration. The underlying iterator will be incremented immediately after it is dereferenced, allowing deletion of the current node or insertion of nodes to not disrupt iteration provided they do not invalidate the *next* iterator -- the current iterator can be invalidated. This requires a very exact pattern of use that is only really suitable to range based for loops and other range algorithms that explicitly guarantee to dereference exactly once each element, and to increment exactly once each element.

Declared at: llvm/include/llvm/ADT/STLExtras.h:618

Templates

RangeT

Parameters

RangeT&& Range