From 8233df46042f94a3b3571168e7731190f159f140 Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Thu, 17 Sep 2020 16:40:23 +0200
Subject: [PATCH] [basegridgeometry] Use more robust way to choose ctor of
 mappers

* use std::is_constructible
---
 dumux/discretization/basegridgeometry.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dumux/discretization/basegridgeometry.hh b/dumux/discretization/basegridgeometry.hh
index 48fe392a9e..40de731121 100644
--- a/dumux/discretization/basegridgeometry.hh
+++ b/dumux/discretization/basegridgeometry.hh
@@ -194,7 +194,7 @@ private:
     //! Return an instance of the element mapper
     ElementMapper makeElementMapper_(const GridView& gridView) const
     {
-        if constexpr (std::is_same_v<ElementMapper, Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>)
+        if constexpr (std::is_constructible<ElementMapper, GridView, Dune::MCMGLayout>())
             return ElementMapper(gridView, Dune::mcmgElementLayout());
         else
             return ElementMapper(gridView);
@@ -203,7 +203,7 @@ private:
     //! Return an instance of the vertex mapper
     VertexMapper makeVertexMapper_(const GridView& gridView) const
     {
-        if constexpr (std::is_same_v<VertexMapper, Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>)
+        if constexpr (std::is_constructible<VertexMapper, GridView, Dune::MCMGLayout>())
             return VertexMapper(gridView, Dune::mcmgVertexLayout());
         else
             return VertexMapper(gridView);
-- 
GitLab