From 05d2f752bcfdda4d4eedc1b08263a51c6834b088 Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Thu, 19 Nov 2020 16:53:14 +0100 Subject: [PATCH] Construct default BitVector for vectors with scalar entries In that case the BitVector will be the input vector type, but with entry type 'char'. --- dune/solvers/common/defaultbitvector.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dune/solvers/common/defaultbitvector.hh b/dune/solvers/common/defaultbitvector.hh index c8f30114..0b7d7cf3 100644 --- a/dune/solvers/common/defaultbitvector.hh +++ b/dune/solvers/common/defaultbitvector.hh @@ -18,11 +18,18 @@ namespace Solvers { namespace Imp { +/** \brief Construct a bitvector type with a nesting that matches the one of a given vector + * + * The default implementation implements the case where the vector is a number type + * (to end recursion), and returns 'char' in such cases. + * + * \tparam Vector The vector types whose nesting shall be matched + */ template<class Vector> struct DefaultBitVector { - static_assert(AlwaysFalse<Vector>::value, "No DefaultBitVector known for this type."); - using type = void; + static_assert(IsNumber<Vector>::value, "No DefaultBitVector known for this type."); + using type = char; }; template<class T, int i> -- GitLab