diff --git a/src/tensor/algstrct.cxx b/src/tensor/algstrct.cxx index ce9ee570..59a8315b 100644 --- a/src/tensor/algstrct.cxx +++ b/src/tensor/algstrct.cxx @@ -891,7 +891,7 @@ namespace CTF_int { sr=sr_; ptr=ptr_; } - ConstPairIterator ConstPairIterator::operator[](int n) const { + ConstPairIterator ConstPairIterator::operator[](int64_t n) const { return ConstPairIterator(sr,ptr+sr->pair_size()*n); } @@ -916,7 +916,7 @@ namespace CTF_int { ptr=ptr_; } - PairIterator PairIterator::operator[](int n) const { + PairIterator PairIterator::operator[](int64_t n) const { return PairIterator(sr,ptr+sr->pair_size()*n); } diff --git a/src/tensor/algstrct.h b/src/tensor/algstrct.h index 6672b5d6..c901a99d 100644 --- a/src/tensor/algstrct.h +++ b/src/tensor/algstrct.h @@ -462,7 +462,7 @@ namespace CTF_int { ConstPairIterator(algstrct const * sr_, char const * ptr_); /** \brief indexing moves by \param[in] n pairs */ - ConstPairIterator operator[](int n) const; + ConstPairIterator operator[](int64_t n) const; /** \brief returns key of pair at head of ptr */ int64_t k() const; @@ -513,7 +513,7 @@ namespace CTF_int { PairIterator(algstrct const * sr_, char * ptr_); /** \brief indexing moves by \param[in] n pairs */ - PairIterator operator[](int n) const; + PairIterator operator[](int64_t n) const; /** \brief returns key of pair at head of ptr */ int64_t k() const;