From 2d05f8e86ad71f372d578509cd43e64e43ff846e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@mi.fu-berlin.de>
Date: Tue, 20 Mar 2018 23:01:45 +0100
Subject: [PATCH] [concept] Add concept for a VectorBackend

---
 dune/functions/functionspacebases/concepts.hh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dune/functions/functionspacebases/concepts.hh b/dune/functions/functionspacebases/concepts.hh
index d2cfef3..b5ddcdc 100644
--- a/dune/functions/functionspacebases/concepts.hh
+++ b/dune/functions/functionspacebases/concepts.hh
@@ -250,6 +250,19 @@ struct GlobalBasis
   );
 };
 
+
+
+// Concept for a VectorBackend
+template<class GlobalBasis>
+struct VectorBackend
+{
+  template<class V>
+  auto require(const V& v) -> decltype(
+    const_cast<V&>(v).resize(std::declval<const GlobalBasis&>()),
+    v[std::declval<typename GlobalBasis::MultiIndex>()]
+  );
+};
+
 } // namespace Dune::Functions::Concept
 } // namespace Dune::Functions
 } // namespace Dune
-- 
GitLab