From 42ddb0d47b32f02e9fd5704c69968bb0544bf022 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Fri, 15 Dec 2000 21:51:02 +0000 Subject: [PATCH] added const in a couple places to make sure the iterator operators that should be const (like operator* and operator[]) are indeed const [SVN r8466] --- include/boost/pending/iterator_tests.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/pending/iterator_tests.hpp b/include/boost/pending/iterator_tests.hpp index 7321eed..15a5ec4 100644 --- a/include/boost/pending/iterator_tests.hpp +++ b/include/boost/pending/iterator_tests.hpp @@ -23,7 +23,7 @@ struct dummyT { // TrivialIterator. // Preconditions: i != j, *i == val template -void trivial_iterator_test(Iterator i, Iterator j, T val) +void trivial_iterator_test(const Iterator i, const Iterator j, T val) { Iterator k; assert(i == i); @@ -52,7 +52,7 @@ void trivial_iterator_test(Iterator i, Iterator j, T val) // Preconditions: i != j template -void mutable_trivial_iterator_test(Iterator i, Iterator j, T val) +void mutable_trivial_iterator_test(const Iterator i, const Iterator j, T val) { *i = val; trivial_iterator_test(i, j, val); @@ -121,7 +121,7 @@ template void random_access_iterator_test(Iterator i, int N, TrueVals vals) { bidirectional_iterator_test(i, vals[0], vals[1]); - Iterator j = i; + const Iterator j = i; int c; for (c = 0; c < N-1; ++c) {