void f(const std::vector<int>& v)
{
- const VectorSlice<const std::vector<int> > s(v,2,3);
-
+ const VectorSlice<const std::vector<int> >
+ s = make_slice(v,2,3);
+
for (unsigned int i=0;i<s.size();++i)
std::cerr << '\t' << s[i];
std::cerr << std::endl;
f(v);
- VectorSlice<std::vector<int> > s2(v, 3, 5);
+ const VectorSlice<const std::vector<int> >
+ s2 = make_slice(v, 3, 5);
int n = s[4];
n += 3;
0 1 2 0 1 2 3
2 0 1
--------------------------------------------------------
-An error occurred in file <slice_vector.h> in function
- SliceVector<VECTOR>::SliceVector(VECTOR&, unsigned int, unsigned int) [with VECTOR = std::vector<int, std::allocator<int> >]
+An error occurred in file <vector_slice.h> in function
+ VectorSlice<VECTOR>::VectorSlice(VECTOR&, unsigned int, unsigned int) [with VECTOR = const std::vector<int, std::allocator<int> >]
The violated condition was:
(start+length<=v.size())
The name and call sequence of the exception was:
--------------------------------------------------------
DEAL::Abort!!!
--------------------------------------------------------
-An error occurred in file <slice_vector.h> in function
- typename VECTOR::reference SliceVector<VECTOR>::operator[](unsigned int) [with VECTOR = std::vector<int, std::allocator<int> >]
+An error occurred in file <vector_slice.h> in function
+ typename VECTOR::reference VectorSlice<VECTOR>::operator[](unsigned int) [with VECTOR = std::vector<int, std::allocator<int> >]
The violated condition was:
(i<length)
The name and call sequence of the exception was: