[#llvm-concat_iterator] = xref:llvm.adoc[llvm]::concat_iterator :relfileprefix: ../ :mrdocs: Iterator wrapper that concatenates sequences together. == Synopsis Declared in `<llvm/ADT/STLExtras.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename ValueT, typename... IterTs> class concat_iterator : public xref:llvm/iterator_facade_base-08c.adoc[iterator_facade_base<concat_iterator<ValueT, IterTs...>, std::forward_iterator_tag, ValueT>] ---- == Description This can concatenate different iterators, even with different types, into a single iterator provided the value types of all the concatenated iterators expose `reference` and `pointer` types that can be converted to `ValueT &` and `ValueT *` respectively. It doesn't support more interesting/customized pointer or reference types. Currently this only supports forward or higher iterator categories as inputs and always exposes a forward iterator interface. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:llvm/iterator_facade_base-08c.adoc[iterator_facade_base<concat_iterator<ValueT, IterTs...>, std::forward_iterator_tag, ValueT>]` | CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of the interface. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:llvm/iterator_facade_base-08c/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/concat_iterator/2constructor.adoc[`concat_iterator`] [.small]#[constructor]# | Construct an iterator from a sequence of ranges. | xref:llvm/concat_iterator/operator_star.adoc[`operator*`] | Return a reference to the current concatenated element. | xref:llvm/iterator_facade_base-08c/operator_plus.adoc[`operator+`] | Advance the iterator by `n` and return the result. | xref:llvm/concat_iterator/operator_inc-0d.adoc[`operator++`] | Increment operators | xref:llvm/iterator_facade_base-08c/operator_minus.adoc[`operator‐`] | Retreat the iterator by `n` and return the result. | xref:llvm/iterator_facade_base-08c/operator_dec-02.adoc[`operator‐‐`] | Decrement operators | 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/concat_iterator/operator_eq.adoc[`operator==`] | Return true if both iterators are at the same concatenated position. | 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/concat_iterator/operator++.adoc[`operator++`] | Bring the postfix increment 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. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/operator_plus-040.adoc[`operator+`] | Return an iterator `n` positions after `i.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#