diff --git a/dune/geometry/virtualrefinement.cc b/dune/geometry/virtualrefinement.cc
index fd9413f605eb3584fa61367633adf907a1da6d44..169f2d6c3b3052267d29e64975e3d6b54298383a 100644
--- a/dune/geometry/virtualrefinement.cc
+++ b/dune/geometry/virtualrefinement.cc
@@ -522,8 +522,8 @@ namespace Dune
       topologyId &= ~1;
       coerceToId &= ~1;
 
-      const unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
-      const unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
+      constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
+      constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
 
       switch( topologyId )
       {
@@ -573,7 +573,7 @@ namespace Dune
       topologyId &= ~1;
       coerceToId &= ~1;
 
-      const unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
+      constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
 
       if (topologyId == 0 && coerceToId == 0)
         return VirtualRefinementImp< idSimplex, CoordType, idSimplex, dimension>::instance();
@@ -595,10 +595,10 @@ namespace Dune
       topologyId &= ~1;
       coerceToId &= ~1;
 
-      const unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
-      const unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
-      const unsigned idPrism = GeometryTypes::prism.id() & ~1;
-      const unsigned idPyramid = GeometryTypes::pyramid.id() & ~1;
+      constexpr unsigned idSimplex = GeometryTypes::simplex(dimension).id() & ~1;
+      constexpr unsigned idCube = GeometryTypes::cube(dimension).id() & ~1;
+      constexpr unsigned idPrism = GeometryTypes::prism.id() & ~1;
+      constexpr unsigned idPyramid = GeometryTypes::pyramid.id() & ~1;
 
       switch( topologyId )
       {