From d840fe1bdfd0fe700ac9d07e8b81c8d184d93733 Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 16 Sep 2004 17:27:15 +0000 Subject: [PATCH] const bug removed git-svn-id: https://svn.dealii.org/trunk@9625 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/slice_vector.h | 41 ++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/deal.II/base/include/base/slice_vector.h b/deal.II/base/include/base/slice_vector.h index 95b9f5b456..f0881c6e9c 100644 --- a/deal.II/base/include/base/slice_vector.h +++ b/deal.II/base/include/base/slice_vector.h @@ -13,7 +13,6 @@ #ifndef __deal2__slice_vector_h #define __deal2__slice_vector_h - #include #include @@ -59,6 +58,45 @@ class SliceVector }; +/** + * Helper function for creating temporary objects without typing + * template arguments. + * + * @relates SliceVector + * @author Guido Kanschat, 2004 + */ +template +inline +const SliceVector +make_slice (VECTOR& v) +{ + const SliceVector r(v); + return r; +} + + + +/** + * Helper function for creating temporary objects without typing + * template arguments. + * + * @relates SliceVector + * @author Guido Kanschat, 2004 + */ +template +inline +const SliceVector +make_slice (VECTOR& v, unsigned int start, unsigned int length) +{ + const SliceVector r(v, start, length); + return r; +} + + + + +//-------------- member functions --------------------// + template inline SliceVector::SliceVector(VECTOR& v) @@ -110,4 +148,3 @@ SliceVector::operator[](unsigned int i) const #endif - -- 2.39.5