]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
better handling of const vectors
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 19 Sep 2004 21:30:59 +0000 (21:30 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 19 Sep 2004 21:30:59 +0000 (21:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@9640 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/vector_slice.h

index 0746cc563eda6c91e6b2161df64455186dbbea5d..9a54fa84eecefb924d4d17a2024fb5f78cae7fb5 100644 (file)
@@ -67,10 +67,10 @@ class VectorSlice
  */
 template <class VECTOR>
 inline
-const VectorSlice<VECTOR>
+const VectorSlice<const VECTOR>
 make_slice (VECTOR& v)
 {
-  const VectorSlice<VECTOR> r(v);
+  const VectorSlice<const VECTOR> r(v);
   return r;
 }
 
@@ -85,10 +85,10 @@ make_slice (VECTOR& v)
  */
 template <class VECTOR>
 inline
-const VectorSlice<VECTOR>
+const VectorSlice<const VECTOR>
 make_slice (VECTOR& v, unsigned int start, unsigned int length)
 {
-  const VectorSlice<VECTOR> r(v, start, length);
+  const VectorSlice<const VECTOR> r(v, start, length);
   return r;
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.