|
BDE 4.14.0 Production release
|
Macros | |
| #define | bslstl_ForwardIterator bslstl::ForwardIterator |
| This alias is defined for backward compatibility. | |
Provide a template to create STL-compliant forward iterators.
Canonical header: bsl_iterator.h
This component provides an iterator adaptor that, given an implementation class defining a core set of iterator functionality, adapts it to provide an STL-compliant forward iterator interface. The set of requirements for a forward iterator is found in "Table 106: Forward iterator requirements", under the tag "[forward.iterators]". (Note that this reference is sourced in N3092, a C++0x working paper; the actual table number may vary in the actual standard.) Include bsl_iterator.h to use this component.
Given the following "iterator-like" implementation class:
simply add the following two typedefs to any container class that provides my_IteratorImp<T> access, and the container will have STL-compliant forward iterators:
Note that the implementation for const_iterator is my_IteratorImp<T> and not my_IteratorImp<const T>, rather the const is added to the return value of operator* by way of conversion to the first template argument.
| #define bslstl_ForwardIterator bslstl::ForwardIterator |