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) `
Synopsis
Declared in <bslstl_forwarditerator.h>
template<
class T,
class ITER_IMP,
class TAG_TYPE = std::forward_iterator_tag>
class ForwardIterator;
Type Aliases
Name |
Description |
Iterator difference type. |
|
Standard forward iterator category tag. |
|
Pointer type for the iterator's value type. |
|
Reference type for the iterator's value type. |
|
Value type for this iterator. |
Member Functions
Name |
Description |
|
Constructors |
Copy the value of the specified |
|
|
|
Return a reference to the current, modifiable element. The behavior is undefined if this iterator has the past‐the‐end value for an iterator over the underlying sequence. |
|
Increment to the next element. Return a reference to this modifiable iterator. The behavior is undefined if, on entry, this iterator has the past‐the‐end value for an iterator over the underlying sequence. |
|
Return a pointer to the current, modifiable element. The behavior is undefined if this iterator has the past‐the‐end value for an iterator over the underlying sequence. |
Non-Member Functions
Name |
Description |
Return |
|
Increment the specified |
|
Return |
Derived Classes
Name |
Description |
Given an |
Created with MrDocs