Commit 8233df46 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[basegridgeometry] Use more robust way to choose ctor of mappers

* use std::is_constructible
parent 4f233aef
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment