Merging iterator bug fix into 1.34 release.

[SVN r34130]
This commit is contained in:
Ronald Garcia
2006-05-31 20:59:58 +00:00
parent a212ac088d
commit cd0639452c

View File

@@ -21,6 +21,7 @@
#include "boost/multi_array/base.hpp"
#include "boost/iterator/iterator_facade.hpp"
#include "boost/mpl/aux_/msvc_eti_base.hpp"
#include <algorithm>
#include <cstddef>
#include <iterator>
@@ -137,11 +138,15 @@ public:
template <class IteratorAdaptor>
bool equal(IteratorAdaptor& rhs) const {
const std::size_t N = NumDims::value;
return (idx_ == rhs.idx_) &&
(base_ == rhs.base_) &&
(extents_ == rhs.extents_) &&
(strides_ == rhs.strides_) &&
(index_base_ == rhs.index_base_);
( (extents_ == rhs.extents_) ||
std::equal(extents_,extents_+N,rhs.extents_) ) &&
( (strides_ == rhs.strides_) ||
std::equal(strides_,strides_+N,rhs.strides_) ) &&
( (index_base_ == rhs.index_base_) ||
std::equal(index_base_,index_base_+N,rhs.index_base_) );
}
template <class DifferenceType>