[#llvm-early_inc_iterator_impl] = xref:llvm.adoc[llvm]::early_inc_iterator_impl :relfileprefix: ../ :mrdocs: A pseudo‐iterator adaptor that is designed to implement "early increment" style loops. == Synopsis Declared in `<llvm/ADT/STLExtras.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename WrappedIteratorT> class early_inc_iterator_impl : public xref:llvm/iterator_adaptor_base-081.adoc[iterator_adaptor_base<early_inc_iterator_impl<WrappedIteratorT>, WrappedIteratorT, std::input_iterator_tag>] ---- == Description This is _not a normal iterator_ and should almost never be used directly. It is intended primarily to be used with range based for loops and some range algorithms. The iterator isn't quite an `OutputIterator` or an `InputIterator` but somewhere between them. The constraints of these iterators are: * On construction or after being incremented, it is comparable and dereferencable. It is _not_ incrementable. * After being dereferenced, it is neither comparable nor dereferencable, it is only incrementable. This means you can only dereference the iterator once, and you can only increment it once between dereferences. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:llvm/iterator_adaptor_base-081.adoc[iterator_adaptor_base<early_inc_iterator_impl<WrappedIteratorT>, WrappedIteratorT, std::input_iterator_tag>]` | CRTP base class for adapting an iterator to a different type. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:llvm/iterator_adaptor_base-081/difference_type.adoc[`difference_type`] | Signed type used to express the distance between iterators. | xref:llvm/iterator_facade_base-08c/iterator_category.adoc[`iterator_category`] | Iterator category tag for this facade. | xref:llvm/iterator_facade_base-08c/pointer.adoc[`pointer`] | Pointer type returned by the iterator. | xref:llvm/iterator_facade_base-08c/reference.adoc[`reference`] | Reference type returned by the iterator. | xref:llvm/iterator_facade_base-08c/value_type.adoc[`value_type`] | Value type produced by the iterator. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/iterator_facade_base-08c/_04enum.adoc[`Unnamed enum`] | Capability flags for the iterator category. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/early_inc_iterator_impl/2constructor.adoc[`early_inc_iterator_impl`] [.small]#[constructor]# | Construct an early‐increment iterator at position `I.` | xref:llvm/early_inc_iterator_impl/operator_star-0d.adoc[`operator*`] | Dereference operators | xref:llvm/iterator_facade_base-08c/operator_plus.adoc[`operator+`] | Advance the iterator by `n` and return the result. | xref:llvm/early_inc_iterator_impl/operator_inc-0b.adoc[`operator++`] | Increment operators | xref:llvm/iterator_adaptor_base-081/operator_plus_eq.adoc[`operator+=`] | Advance the wrapped iterator by `n.` | xref:llvm/iterator_adaptor_base-081/operator_minus-0f.adoc[`operator‐`] | Subtraction operators | xref:llvm/iterator_adaptor_base-081/operator_dec-00.adoc[`operator‐‐`] | Decrement operators | xref:llvm/iterator_adaptor_base-081/operator_minus_eq.adoc[`operator‐=`] | Retreat the wrapped iterator by `n.` | xref:llvm/iterator_facade_base-08c/operator_ptr.adoc[`operator‐>`] | Return a proxy pointer to the current element. | xref:llvm/iterator_facade_base-08c/operator_subs.adoc[`operator[]`] | Return a proxy to the element at offset `n.` | xref:llvm/iterator_facade_base-08c/operator_le.adoc[`operator<=`] | Return true if this iterator is less than or equal to `RHS.` | xref:llvm/iterator_facade_base-08c/operator_gt.adoc[`operator>`] | Return true if this iterator is greater than `RHS.` | xref:llvm/iterator_facade_base-08c/operator_ge.adoc[`operator>=`] | Return true if this iterator is greater than or equal to `RHS.` |=== == Using Declarations [cols="1,4"] |=== | Name| Description | xref:llvm/early_inc_iterator_impl/operator*.adoc[`operator*`] | Bring the const dereference operator into scope. | xref:llvm/early_inc_iterator_impl/operator++.adoc[`operator++`] | Bring the postfix increment operator into scope. | xref:llvm/iterator_adaptor_base-081/operator-.adoc[`operator‐`] | Bring the offset‐subtraction operator from the facade into scope. | xref:llvm/iterator_adaptor_base-081/operator--.adoc[`operator‐‐`] | Bring the postfix decrement operator into scope. |=== == Protected Types [cols="1,4"] |=== | Name| Description | xref:llvm/iterator_facade_base-08c/PointerProxy.adoc[`PointerProxy`] | Proxy that yields a pointer from a copied reference. | xref:llvm/iterator_facade_base-08c/ReferenceProxy.adoc[`ReferenceProxy`] | Proxy that yields a reference from a copied iterator. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/iterator_adaptor_base-081/wrapped.adoc[`wrapped`] | Return the wrapped underlying iterator. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/iterator_adaptor_base-081/I.adoc[`I`] | Wrapped underlying iterator. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:llvm/operator_eq-0dad.adoc[llvm::operator==]` | Compare two early‐increment iterators by underlying position. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/make_early_inc_range.adoc[`make_early_inc_range`] | Make a range that does early increment to allow mutation of the underlying range without disrupting iteration. | xref:llvm/operator_plus-040.adoc[`operator+`] | Return an iterator `n` positions after `i.` | xref:llvm/operator_lt-018.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-02a.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-046.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-04b.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-05d.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-06.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-078.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-083.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0a4.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0ac.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0af.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0b0.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0b27.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0b8.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0be.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0c9.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0e4.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_lt-0ee.adoc[`operator<`] | Compare two adapted iterators for order. | xref:llvm/operator_eq-000.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-008.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-00f.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-010.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-02f.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-03c0.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-042.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-051.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-08f.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-09d9.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0a4.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0a7.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0b8.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0bc.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0cc.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0ec1.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0f6.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. | xref:llvm/operator_eq-0faa.adoc[`operator==`] | Return true if `LHS` and `RHS` wrap equal iterators. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#