operator() requires Collection concept, calls access_element, which

should in turn require it too, but was using RandomCollection Concept.
Fixes ticket #5664.


[SVN r76571]
This commit is contained in:
Ronald Garcia 2012-01-18 02:27:54 +00:00
parent 723c1a0a93
commit bc5df6a074

View File

@ -332,7 +332,8 @@ protected:
const size_type* extents,
const index* strides,
const index* index_bases) const {
boost::function_requires<
CollectionConcept<IndexList> >();
ignore_unused_variable_warning(index_bases);
ignore_unused_variable_warning(extents);
#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS)
@ -343,9 +344,15 @@ protected:
#endif
index offset = 0;
for (size_type n = 0; n != NumDims; ++n)
offset += indices[n] * strides[n];
{
typename IndexList::const_iterator i = indices.begin();
size_type n = 0;
while (n != NumDims) {
offset += (*i) * strides[n];
++n;
++i;
}
}
return base[offset];
}