Index: ./VC/boost_1_42_0/boost/iterator/counting_iterator.hpp =================================================================== --- ./VC/boost_1_42_0/boost/iterator/counting_iterator.hpp (old) +++ ./VC/boost_1_42_0/boost/iterator/counting_iterator.hpp (new) @@ -108,7 +107,13 @@ // criterion (see boost/iterator/detail/facade_iterator_category.hpp) # endif , traversal - , Incrementable const& // reference + , Incrementable // reference + // boost ticket #2640: counting_iterator::reference lifetime tied to iterator + // Counting_iterators must return copies because they only keep their current value in memory + // Otherwise the following doesn't work: + // counting_iterator a; + // counting_iterator b=a; + // return *(--b); + // This will return a reference to the Incrementable member of local variable b. reverse_iterator does just that. , difference > type; };