[#BloombergLP-bslstl-ForwardIterator] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::ForwardIterator :relfileprefix: ../../ :mrdocs: STL‐compliant forward iterator adapted from a minimal implementation. == Synopsis Declared in `<bslstl_forwarditerator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class T, class ITER_IMP, class TAG_TYPE = std::forward_iterator_tag> class ForwardIterator; ---- == Description Given an `ITER_IMP` type that implements a minimal subset of an iterator interface, this template generates a complete iterator that meets all of the requirements of a "forward iterator" in the C++ standard. If `T` is const‐qualified, then the resulting type is a const iterator. `T` shall not be a function, reference type or void. `ITER_IMP` must provide public operations so that, for objects `i` and `j` of type `ITER_IMP`, the following operations are supported: ` ITER_IMP i; Default construction ITER_IMP j(i); Copy construction i = j Assignment ++i Increment to next element i == j // convertible to bool Equality comparison *i // reference convertible to T& Element access (dereference) ` == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/ForwardIterator/difference_type.adoc[`difference_type`] | Iterator difference type. | xref:BloombergLP/bslstl/ForwardIterator/iterator_category.adoc[`iterator_category`] | Standard forward iterator category tag. | xref:BloombergLP/bslstl/ForwardIterator/pointer.adoc[`pointer`] | Pointer type for the iterator's value type. | xref:BloombergLP/bslstl/ForwardIterator/reference.adoc[`reference`] | Reference type for the iterator's value type. | xref:BloombergLP/bslstl/ForwardIterator/value_type.adoc[`value_type`] | Value type for this iterator. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/ForwardIterator/2constructor-05.adoc[`ForwardIterator`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslstl/ForwardIterator/operator_assign.adoc[`operator=`] | Assign to this iterator the value of a compatible iterator. | xref:BloombergLP/bslstl/ForwardIterator/imp-0e.adoc[`imp`] | `imp` overloads | xref:BloombergLP/bslstl/ForwardIterator/operator_star.adoc[`operator*`] | Return a reference to the current element. | xref:BloombergLP/bslstl/ForwardIterator/operator_inc.adoc[`operator++`] | Advance this iterator to the next element. | xref:BloombergLP/bslstl/ForwardIterator/operator_ptr.adoc[`operator‐>`] | Return a pointer to the current element. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/operator_not_eq-0bc.adoc[`operator!=`] | Return `true` if `lhs` and `rhs` do not have the same value. | xref:BloombergLP/bslstl/operator_inc-008.adoc[`operator++`] | Advance `iter` to the next element and return its previous value. | xref:BloombergLP/bslstl/operator_eq-066.adoc[`operator==`] | Return `true` if `lhs` and `rhs` have the same value. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/BidirectionalIterator.adoc[`BidirectionalIterator`] | Adaptor that produces a standard bidirectional iterator from a core type. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#