diff --git a/permutation.cc b/permutation.cc index ea69e25..bf8889a 100644 --- a/permutation.cc +++ b/permutation.cc @@ -173,7 +173,7 @@ T n=p.size(); NRVec_from1 used(0,n),tmp(n); T firstunused=1; T currentcycle=0; -std::list > cyclelist={}; +std::list > cyclelist; do { //find a cycle starting with first unused element @@ -199,7 +199,7 @@ while(firstunused<=n); //convert list to NRVec this->resize(currentcycle); T i=1; -for(auto l=cyclelist.begin(); l!=cyclelist.end(); ++l) (*this)[i++] = *l; +for(typename std::list >::iterator l=cyclelist.begin(); l!=cyclelist.end(); ++l) (*this)[i++] = *l; } @@ -345,7 +345,7 @@ do { //make vector from list c.resize(length); int i=0; -for(auto l=cycle.begin(); l!=cycle.end(); ++l) c[++i] = *l; +for(typename std::list::iterator l=cycle.begin(); l!=cycle.end(); ++l) c[++i] = *l; return closebracket+1; } @@ -354,7 +354,7 @@ template void CyclePerm::readfrom(const std::string &line) { const char *p=line.c_str(); -std::list > cyclelist={}; +std::list > cyclelist; int ncycles=0; int count=0; NRVec_from1 c; @@ -372,7 +372,7 @@ while(p=read1cycle(c,p)) //convert list to vector this->resize(count); T i=0; -for(auto l=cyclelist.begin(); l!=cyclelist.end(); ++l) (*this)[++i] = *l; +for(typename std::list >::iterator l=cyclelist.begin(); l!=cyclelist.end(); ++l) (*this)[++i] = *l; #ifdef DEBUG if(!this->is_valid()) laerror("readfrom received input of invalid CyclePerm"); #endif