]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/multi_array/subarray.hpp
* src/MenuBackend.[Ch]: the specialMenu is now a real menu, not a
[lyx.git] / boost / boost / multi_array / subarray.hpp
index bc5f6ff5f9095041e43b5c1a8066008c4d394eec..359d00e951a3eb528e6af563c06347011be6d7c2 100644 (file)
@@ -79,9 +79,11 @@ public:
   
   template <typename IndexList>
   const element& operator()(const IndexList& indices) const {
+    boost::function_requires<
+      detail::multi_array::CollectionConcept<IndexList> >();
     return super_type::access_element(boost::type<const element&>(),
-                                      origin(),
-                                      indices,strides());
+                                      indices,origin(),
+                                      shape(),strides(),index_bases());
   }
 
   // see generate_array_view in base.hpp
@@ -142,7 +144,7 @@ public:
   }
 
   const_iterator end() const {
-    return const_iterator(*index_bases()+*shape(),origin(),
+    return const_iterator(*index_bases()+(index)*shape(),origin(),
                           shape(),strides(),index_bases());
   }
 
@@ -284,9 +286,12 @@ public:
 
   template <class IndexList>
   element& operator()(const IndexList& indices) {
+    boost::function_requires<
+      detail::multi_array::CollectionConcept<IndexList> >();
     return super_type::access_element(boost::type<element&>(),
-                                      origin(),
-                                      indices,this->strides());
+                                      indices,origin(),
+                                      this->shape(),this->strides(),
+                                      this->index_bases());
   }
 
   iterator begin() {
@@ -295,7 +300,7 @@ public:
   }
 
   iterator end() {
-    return iterator(*this->index_bases()+*this->shape(),origin(),
+    return iterator(*this->index_bases()+(index)*this->shape(),origin(),
                     this->shape(),this->strides(),this->index_bases());
   }
 
@@ -316,6 +321,8 @@ public:
 
   template <class IndexList>
   const element& operator()(const IndexList& indices) const {
+    boost::function_requires<
+      detail::multi_array::CollectionConcept<IndexList> >();
     return super_type::operator()(indices);
   }