From 356284ff3a2fd33ef725f45d27538ee5de417645 Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Tue, 2 Aug 2005 12:24:59 +0000
Subject: [PATCH] latest expression template updates

[[Imported from SVN: r302]]
---
 istl/bcrsmatrix.hh | 24 ++++++++++++++++++++++++
 istl/bvector.hh    |  7 +++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/istl/bcrsmatrix.hh b/istl/bcrsmatrix.hh
index c88efcf54..22e569dc7 100644
--- a/istl/bcrsmatrix.hh
+++ b/istl/bcrsmatrix.hh
@@ -52,8 +52,13 @@ namespace Dune {
            Setting the compile time switch DUNE_ISTL_WITH_CHECKING
            enables error checking.
    */
+#ifdef DUNE_EXPRESSIONTEMPLATES
+  template<class B, class A>
+  class BCRSMatrix : public ExprTmpl::Matrix< BCRSMatrix<B,A> >
+#else
   template<class B, class A=ISTLAllocator>
   class BCRSMatrix
+#endif
   {
   public:
 
@@ -1282,6 +1287,25 @@ namespace Dune {
   };
 
 
+#ifdef DUNE_EXPRESSIONTEMPLATES
+  template <class B, class A>
+  struct FieldType< BCRSMatrix<B,A> >
+  {
+    typedef typename FieldType<B>::type type;
+  };
+
+  template <class B, class A>
+  struct BlockType< BCRSMatrix<B,A> >
+  {
+    typedef B type;
+  };
+  template <class B, class A>
+  struct RowType< BCRSMatrix<B,A> >
+  {
+    typedef CompressedBlockVectorWindow<B,A> type;
+  };
+#endif
+
   /** @} end documentation */
 
 } // end namespace
diff --git a/istl/bvector.hh b/istl/bvector.hh
index 07da9b6a8..9b6eec2be 100644
--- a/istl/bvector.hh
+++ b/istl/bvector.hh
@@ -222,10 +222,13 @@ namespace Dune {
           Setting the compile time switch DUNE_ISTL_WITH_CHECKING
           enables error checking.
    */
+#ifdef DUNE_EXPRESSIONTEMPLATES
+  template<class B, class A>
+  class BlockVector : public block_vector_unmanaged<B,A> ,
+                      public Dune::ExprTmpl::Vector< Dune::BlockVector<B,A> >
+#else
   template<class B, class A=ISTLAllocator>
   class BlockVector : public block_vector_unmanaged<B,A>
-#ifdef DUNE_EXPRESSIONTEMPLATES
-                      , public Dune::ExprTmpl::Vector< Dune::BlockVector<B,A> >
 #endif
   {
   public:
-- 
GitLab