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; } };