diff --git a/dune/functions/functionspacebases/concepts.hh b/dune/functions/functionspacebases/concepts.hh index d2cfef36aebdb37ddfe71360494be3999838b537..b5ddcdc275ba1c5c1194877c899d301e4cd6369d 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