From cebe553621cb23f1d1913bc165350fbdcfb5d439 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Tue, 17 Oct 2000 00:16:05 +0000 Subject: [PATCH] ported the graph library to borland [SVN r7965] --- include/boost/pending/iterator_adaptors.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/boost/pending/iterator_adaptors.hpp b/include/boost/pending/iterator_adaptors.hpp index 8c185fb..dddd457 100644 --- a/include/boost/pending/iterator_adaptors.hpp +++ b/include/boost/pending/iterator_adaptors.hpp @@ -37,8 +37,11 @@ struct type {}; // class if you want to customize particular policies. struct default_iterator_policies { + // Some of these members were defined static, but Borland got confused + // and thought they were non-const. + template - static Reference dereference(type, const Iterator& x) + Reference dereference(type, const Iterator& x) const { return *x; } template @@ -54,15 +57,15 @@ struct default_iterator_policies { x += n; } template - static Difference distance(type, const Iterator1& x, const Iterator2& y) + Difference distance(type, const Iterator1& x, const Iterator2& y) const { return y - x; } template - static bool equal(const Iterator1& x, const Iterator2& y) + bool equal(const Iterator1& x, const Iterator2& y) const { return x == y; } template - static bool less(const Iterator1& x, const Iterator2& y) + bool less(const Iterator1& x, const Iterator2& y) const { return x < y; } };