From d3daa4756122695a7a207f8df21d7549bd436d0e Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 1 Feb 2004 22:11:47 +0000 Subject: [PATCH] Don't allow non-random-access-traversal iterators to be subtracted. [SVN r22121] --- include/boost/iterator/counting_iterator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/iterator/counting_iterator.hpp b/include/boost/iterator/counting_iterator.hpp index 0a55967..d21ea8f 100644 --- a/include/boost/iterator/counting_iterator.hpp +++ b/include/boost/iterator/counting_iterator.hpp @@ -127,7 +127,7 @@ namespace detail { static Difference distance(Incrementable1 x, Incrementable2 y) { - return boost::detail::distance(x, y); + return y - x; } };