From 24a7094017fd565e99ee7807e1757c0c99d08e60 Mon Sep 17 00:00:00 2001
From: Jonathan Turkanis
Another example is a counting iterator, an iterator the returns a sequence of -integers when incremented and dereferenced (see boost::counting_iterator). +integers when incremented and dereferenced (see boost::counting_iterator). There are two ways to implement this iterator, 1) make the reference type be a true reference (a reference to an integer data member of the counting iterator) or 2) make the reference type be the same as the @@ -79,7 +79,7 @@ iterator) or 2) make the reference type be the same as the 2) is therefore a better choice, but then we have a counting iterator that cannot be a random access iterator.
Yet another example is a transform iterator, an iterator adaptor that applies -a unary function object to the dereference value of the wrapped iterator (see boost::transform_iterator). +a unary function object to the dereference value of the wrapped iterator (see boost::transform_iterator). For unary functions such as std::times the return type of operator* clearly needs to be the result_type of the function object, which is typically not a reference. However, with the current iterator