From b134e8fa1b93b24c0f5916c96090f016d8a7c9d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Rheinl=C3=A4nder?= Date: Mon, 20 Sep 2010 11:16:47 +0000 Subject: [PATCH] symmetry::compare_same_type(): const-correctness fix The method in question is const, therefore one should use const_iterator to access indices. Some compilers (for instance, msvc) are very strict about this, and won't accept (invalid) code using non-const iterator. --- ginac/symmetry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ginac/symmetry.cpp b/ginac/symmetry.cpp index 23f9df90..5dd974c2 100644 --- a/ginac/symmetry.cpp +++ b/ginac/symmetry.cpp @@ -160,7 +160,7 @@ int symmetry::compare_same_type(const basic & other) const return 1; if (this_size < that_size) return -1; - typedef std::set::iterator set_it; + typedef std::set::const_iterator set_it; set_it end = indices.end(); for (set_it i=indices.begin(),j=othersymm.indices.begin(); i!=end; ++i,++j) { if(*i < *j) -- 2.49.0