diff --git a/common/genericiterator.hh b/common/genericiterator.hh index 1765ef16dfc0854b97da76549bb6a29a501a8c79..8ab0a9a96efe4a7346b9a127c8a315de7958cdbf 100644 --- a/common/genericiterator.hh +++ b/common/genericiterator.hh @@ -140,7 +140,7 @@ namespace Dune { * 1. if we are mutable this is the only valid copy constructor, as the arguments is a mutable iterator * 2. if we are a const iterator the argument is a mutable iterator => This is the needed conversion to initialize a const iterator form a mutable one. */ - GenericIterator(const GenericIterator<typename remove_const<Container>::type, typename remove_const<T>::type >& other) : container_(other.container_), position_(other.position_) + GenericIterator(const GenericIterator<typename remove_const<Container>::type, typename remove_const<T>::type,D >& other) : container_(other.container_), position_(other.position_) {} /** @@ -152,17 +152,17 @@ namespace Dune { * 1. if we are mutable the arguments is a const iterator and therefore calling this method is mistake in the users code and results in a (probably not understandable compiler error * 2. If we are a const iterator this is the default copy constructor as the argument is a const iterator too. */ - GenericIterator(const GenericIterator<const typename remove_const<Container>::type, const typename remove_const<T>::type >& other) : container_(other.container_), position_(other.position_) + GenericIterator(const GenericIterator<const typename remove_const<Container>::type, const typename remove_const<T>::type, D >& other) : container_(other.container_), position_(other.position_) {} // Methods needed by the forward iterator - bool equals(const GenericIterator<typename remove_const<Container>::type,typename remove_const<T>::type>& other) const + bool equals(const GenericIterator<typename remove_const<Container>::type,typename remove_const<T>::type,D>& other) const { return position_ == other.position_ && container_ == other.container_; } - bool equals(const GenericIterator<const typename remove_const<Container>::type,const typename remove_const<T>::type>& other) const + bool equals(const GenericIterator<const typename remove_const<Container>::type,const typename remove_const<T>::type,D>& other) const { return position_ == other.position_ && container_ == other.container_; } @@ -189,13 +189,13 @@ namespace Dune { position_=position_+n; } - std::ptrdiff_t distanceTo(GenericIterator<const typename remove_const<Container>::type,const typename remove_const<T>::type> other) const + std::ptrdiff_t distanceTo(GenericIterator<const typename remove_const<Container>::type,const typename remove_const<T>::type,D> other) const { assert(other.container_==container_); return other.position_ - position_; } - std::ptrdiff_t distanceTo(GenericIterator<typename remove_const<Container>::type, typename remove_const<T>::type> other) const + std::ptrdiff_t distanceTo(GenericIterator<typename remove_const<Container>::type, typename remove_const<T>::type,D> other) const { assert(other.container_==container_); return other.position_ - position_;