Node:Iterator tags, Next:, Previous:Random access iterators, Up:Iterators



Iterator tags

T* value_type (const T*) Function
ptrdiff_t* distance_type (const T*) Function
To implement algorithms only in terms of iterators, it is often necessary to infer both of the value type and the distance type from the iterator. To enable this task it is required that for an iterator i of any category other than output iterator, the expression value_type(i) returns (T*)(0) and the expression distance_type(i) returns (Distance*)(0). For output iterators, these expressions are not required.