From cd2ccaf82625853abe1749f7b2e28d55b291e236 Mon Sep 17 00:00:00 2001
From: Lasse Hinrichsen <lh1887@mi.fu-berlin.de>
Date: Fri, 27 Oct 2017 12:01:23 +0200
Subject: [PATCH] [bugfix] add explicit cast

If the gcc implementation of std::variant is used instead of the fallback,
the compiler chokes on this without an explicit cast.
---
 dune/subgrid/subgrid/subgridgeometry.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dune/subgrid/subgrid/subgridgeometry.hh b/dune/subgrid/subgrid/subgridgeometry.hh
index cc89551..578ca06 100644
--- a/dune/subgrid/subgrid/subgridgeometry.hh
+++ b/dune/subgrid/subgrid/subgridgeometry.hh
@@ -233,12 +233,12 @@ class SubGridLocalGeometry
 
         //! The Jacobian matrix of the mapping from the reference element to this element
         const JacobianTransposed jacobianTransposed (const FieldVector<ctype, mydim>& local) const {
-            return Std::visit([&](auto&& geom) {return geom.jacobianTransposed(local);}, localGeometry_);
+            return Std::visit([&](auto&& geom) {return static_cast<JacobianTransposed>(geom.jacobianTransposed(local));}, localGeometry_);
         }
 
         //! The inverse of the Jacobian matrix of the mapping from the reference element to this element
         const JacobianInverseTransposed jacobianInverseTransposed (const FieldVector<ctype, mydim>& local) const {
-            return Std::visit([&](auto&& geom) {return geom.jacobianInverseTransposed(local);}, localGeometry_);
+            return Std::visit([&](auto&& geom) {return static_cast<JacobianInverseTransposed>(geom.jacobianInverseTransposed(local));}, localGeometry_);
         }
 
     private:
-- 
GitLab