From: Jan Rheinländer Date: Mon, 20 Sep 2010 11:16:47 +0000 (+0000) Subject: symmetry::compare_same_type(): const-correctness fix X-Git-Tag: release_1-6-0~18^2~5 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=b134e8fa1b93b24c0f5916c96090f016d8a7c9d7;p=ginac.git 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. --- 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)