C++ iterators for iterating over pairs of elements from a container.