mirror of
https://github.com/boostorg/multi_array.git
synced 2025-05-12 13:51:36 +00:00
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:
parent
723c1a0a93
commit
bc5df6a074
@ -332,7 +332,8 @@ protected:
|
|||||||
const size_type* extents,
|
const size_type* extents,
|
||||||
const index* strides,
|
const index* strides,
|
||||||
const index* index_bases) const {
|
const index* index_bases) const {
|
||||||
|
boost::function_requires<
|
||||||
|
CollectionConcept<IndexList> >();
|
||||||
ignore_unused_variable_warning(index_bases);
|
ignore_unused_variable_warning(index_bases);
|
||||||
ignore_unused_variable_warning(extents);
|
ignore_unused_variable_warning(extents);
|
||||||
#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS)
|
#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS)
|
||||||
@ -343,9 +344,15 @@ protected:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
index offset = 0;
|
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];
|
return base[offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user