]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
const bug removed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Sep 2004 17:27:15 +0000 (17:27 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Sep 2004 17:27:15 +0000 (17:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@9625 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/slice_vector.h

index 95b9f5b456af11e62eadf89e907055cc1e80aceb..f0881c6e9ceb321548a1a91af37ae7561a865e08 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef __deal2__slice_vector_h
 #define __deal2__slice_vector_h
 
-
 #include <base/config.h>
 #include <base/exceptions.h>
 
@@ -59,6 +58,45 @@ class SliceVector
 };
 
 
+/**
+ * Helper function for creating temporary objects without typing
+ * template arguments.
+ *
+ * @relates SliceVector
+ * @author Guido Kanschat, 2004
+ */
+template <class VECTOR>
+inline
+const SliceVector<VECTOR>
+make_slice (VECTOR& v)
+{
+  const SliceVector<VECTOR> r(v);
+  return r;
+}
+
+
+
+/**
+ * Helper function for creating temporary objects without typing
+ * template arguments.
+ *
+ * @relates SliceVector
+ * @author Guido Kanschat, 2004
+ */
+template <class VECTOR>
+inline
+const SliceVector<VECTOR>
+make_slice (VECTOR& v, unsigned int start, unsigned int length)
+{
+  const SliceVector<VECTOR> r(v, start, length);
+  return r;
+}
+
+
+
+
+//-------------- member functions --------------------//
+
 template <class VECTOR>
 inline
 SliceVector<VECTOR>::SliceVector(VECTOR& v)
@@ -110,4 +148,3 @@ SliceVector<VECTOR>::operator[](unsigned int i) const
 
 
 #endif
-

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.