diff --git a/dumux/porousmediumflow/1pnc/volumevariables.hh b/dumux/porousmediumflow/1pnc/volumevariables.hh
index 0ca6e1abff445620de19ec6b0b0d22b9f1944bca..62812ff26b329d6235dd30497bf9fe5b003c5eff 100644
--- a/dumux/porousmediumflow/1pnc/volumevariables.hh
+++ b/dumux/porousmediumflow/1pnc/volumevariables.hh
@@ -78,7 +78,7 @@ class OnePNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
 
     };
 
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
     static const int dim = GridView::dimension;
     static const int dimWorld = GridView::dimensionworld;
 
diff --git a/dumux/porousmediumflow/3pwateroil/localresidual.hh b/dumux/porousmediumflow/3pwateroil/localresidual.hh
index 4bb312fd7890e2431b25ff0b0980ad98afafdd59..317a02d5c491c92cdc4ff28caa13c690177ceec6 100644
--- a/dumux/porousmediumflow/3pwateroil/localresidual.hh
+++ b/dumux/porousmediumflow/3pwateroil/localresidual.hh
@@ -77,7 +77,7 @@ protected:
     };
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 public:
     using ParentType::ParentType;
 
diff --git a/dumux/porousmediumflow/co2/volumevariables.hh b/dumux/porousmediumflow/co2/volumevariables.hh
index 430be2ef4bd0b843717c4bfec00ba386e4e434d2..bcd8b7190a7a93a98f7b5564598d4e1127e12e2f 100644
--- a/dumux/porousmediumflow/co2/volumevariables.hh
+++ b/dumux/porousmediumflow/co2/volumevariables.hh
@@ -82,7 +82,7 @@ class TwoPTwoCCO2VolumeVariables : public TwoPTwoCVolumeVariables<TypeTag>
         pressureIdx = Indices::pressureIdx
     };
 
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
 public:
     //! The type of the object returned by the fluidState() method
diff --git a/dumux/porousmediumflow/richardsnc/volumevariables.hh b/dumux/porousmediumflow/richardsnc/volumevariables.hh
index 60e722d434cf3ffaf992c66c60335d54a53eb8dd..cca386cd04d55dab0a46db817d9093eaff1f9e69 100644
--- a/dumux/porousmediumflow/richardsnc/volumevariables.hh
+++ b/dumux/porousmediumflow/richardsnc/volumevariables.hh
@@ -330,7 +330,7 @@ class RichardsNCVolumeVariables : public RichardsBaseVolumeVariables<TypeTag>
         pressureIdx = Indices::pressureIdx
     };
 
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
     static const int dim = GridView::dimension;
     static const int dimWorld = GridView::dimensionworld;
     static const int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh
index 944ae32dbe1dac44d07e29cda8e4c372794c80cf..a670d5b1ea9db40645923b0d65c31a473d504889 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2cniconductionproblem.hh
@@ -134,7 +134,7 @@ class OnePTwoCNIConductionProblem : public PorousMediumFlowProblem<TypeTag>
     };
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
     static const auto phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
     static const bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
 
diff --git a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh
index cc8a0be81ba196ea4ee019d1fc58371d06b028ed..2a43f8025dd5c2ada07dc71853bedee48a1e546d 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2cniconvectionproblem.hh
@@ -134,7 +134,7 @@ class OnePTwoCNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
     };
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
     static const auto phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
     static const bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
 
diff --git a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh b/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh
index 88d755f36c6c25c6d37f643b29ba1b11b56e451a..dfaa61e90c903b86b245b9e955b9d9a12a1c5e44 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2ctestproblem.hh
@@ -129,7 +129,7 @@ class OnePTwoCTestProblem : public PorousMediumFlowProblem<TypeTag>
     };
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
     static const auto phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
     static const bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
 
diff --git a/test/porousmediumflow/2p2c/implicit/waterairproblem.hh b/test/porousmediumflow/2p2c/implicit/waterairproblem.hh
index d61b8c7eb45fc30e08726020f3c4e9201d61d082..8ed321de7a1307c4bf6029bb42e555d46ee2fd8b 100644
--- a/test/porousmediumflow/2p2c/implicit/waterairproblem.hh
+++ b/test/porousmediumflow/2p2c/implicit/waterairproblem.hh
@@ -143,7 +143,7 @@ class WaterAirProblem : public PorousMediumFlowProblem<TypeTag>
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
 public:
     /*!
diff --git a/test/porousmediumflow/2pnc/implicit/2pncdiffusion.hh b/test/porousmediumflow/2pnc/implicit/2pncdiffusion.hh
index e42972b5b997e3249abefe5adb4e94274f82190b..d033419a2d11d846b04fd34dd283a9fe80e8caf2 100644
--- a/test/porousmediumflow/2pnc/implicit/2pncdiffusion.hh
+++ b/test/porousmediumflow/2pnc/implicit/2pncdiffusion.hh
@@ -108,7 +108,7 @@ class TwoPNCDiffusionProblem : public PorousMediumFlowProblem<TypeTag>
     using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
 public:
     /*!
diff --git a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh
index 6d13735af3574549d9f513be90c6cdc9273089ac..92415f8515a0e70a771588663da3b79f8d726bad 100644
--- a/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh
+++ b/test/porousmediumflow/co2/implicit/heterogeneousproblem.hh
@@ -168,7 +168,7 @@ class HeterogeneousProblem : public PorousMediumFlowProblem<TypeTag>
     using CO2 = Dumux::CO2<Scalar, HeterogeneousCO2Tables::CO2Tables>;
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
     // the discretization method we are using
     static constexpr auto discMethod = GET_PROP_VALUE(TypeTag, DiscretizationMethod);
diff --git a/test/porousmediumflow/tracer/1ptracer/tracertestproblem.hh b/test/porousmediumflow/tracer/1ptracer/tracertestproblem.hh
index b828cd580a3a5acd552c1624d5601b6d91f53e84..c1003b7c9254085ff4315fffcceea05dc96374e8 100644
--- a/test/porousmediumflow/tracer/1ptracer/tracertestproblem.hh
+++ b/test/porousmediumflow/tracer/1ptracer/tracertestproblem.hh
@@ -146,7 +146,7 @@ class TracerTestProblem : public PorousMediumFlowProblem<TypeTag>
     using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
diff --git a/test/porousmediumflow/tracer/constvel/tracertestproblem.hh b/test/porousmediumflow/tracer/constvel/tracertestproblem.hh
index 8e1f5abbbe2d51e1ef1906f4dc8e110bd6b2a66b..b60cc8f01aff24bb49699ff8f572523cf1dcb4b7 100644
--- a/test/porousmediumflow/tracer/constvel/tracertestproblem.hh
+++ b/test/porousmediumflow/tracer/constvel/tracertestproblem.hh
@@ -168,7 +168,7 @@ class TracerTest : public PorousMediumFlowProblem<TypeTag>
     using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
diff --git a/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh b/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh
index 7be6fc9431991acf4d8e737a532fd2c6f0f569e4..342e395443e6e991c964b84c3636c7bf6c38e9fb 100644
--- a/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh
+++ b/test/porousmediumflow/tracer/multicomp/maxwellstefantestproblem.hh
@@ -188,7 +188,7 @@ class MaxwellStefanTestProblem : public PorousMediumFlowProblem<TypeTag>
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     //! property that defines whether mole or mass fractions are used
-    static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
+    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
     static const int dimWorld = GridView::dimensionworld;
     using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;