
Hi, counting_iterator.hpp defines the distance_to() member function as follows (from CVS HEAD), template <class OtherIncrementable> difference_type distance_to(counting_iterator<OtherIncrementable> const& y) const { ... Since the argument counting_iterator<OtherIncrementable> uses the default values for CategoryOrTraversal and Difference, this distance_to() template does not apply for counting_iterator's with other than the default values for CategoryOrTraversal and Difference. In particular, for a counting_iterator with non-default CategoryOrTraversal or Difference, the necessary function typedef counting_iterator<Incrementable, CategoryOrTraversal, Distance> it_type; it_type::distance_to(it_type const&) cannot be instantiated from the above template, resulting in a compile-time error. Best, Martin