This utility struct provides a namespace for functions on iterators and iterator ranges.
Declared in <bslstl_iteratorutil.h>
struct IteratorUtil;
| Name | Description |
|---|---|
IterKey_t | Return the key-type of the specified iterator type, which is expected to refer to a pair<KEY_TYPE, MAPPED_TYPE>. |
IterMapped_t | Return the mapped-type of the specified iterator type, which is expected to refer to a pair<KEY_TYPE, MAPPED_TYPE>. |
IterToAlloc_t | Return the type that is actually stored in a map. The supplied iterator type is expected to refer to a pair<KEY_TYPE, MAPPED_TYPE>. |
IterVal_t | Return the value_type of the specified iterator type. |
| Name | Description |
|---|---|
canCalculateInsertDistance | Return true if the calculation of insertDistance is supported for iterators of the specified types, false otherwise. |
insertDistance | Return 0 if the (template parameter) type t_INPUT_ITERATOR is limited to the standard input-iterator category, otherwise return the number of elements reachable from the specified first to (but not including) the specified last. This function has a constant-time complexity if the iterator category of t_INPUT_ITERATOR is strictly a standard input iterator, or is a random access iterator, otherwise it is linear in the length of the range [first .. last)]. The behavior is undefined unless last is reachable from first. |