From 3497312b7ab14e1359c2503a8e2dd342a0015a22 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Thu, 5 Apr 2018 16:25:02 +0200
Subject: [PATCH] [tutorial] Constexpr function must contain return statement

---
 tutorial/ex3/components/mycompressiblecomponent.hh   | 9 +++------
 tutorial/ex3/components/myincompressiblecomponent.hh | 5 +----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/tutorial/ex3/components/mycompressiblecomponent.hh b/tutorial/ex3/components/mycompressiblecomponent.hh
index 0e65ac440e..c2e7b2e2ab 100644
--- a/tutorial/ex3/components/mycompressiblecomponent.hh
+++ b/tutorial/ex3/components/mycompressiblecomponent.hh
@@ -56,18 +56,15 @@ public:
       * \brief Returns true if the liquid phase is assumed to be compressible
       */
      static constexpr bool liquidIsCompressible()
-     {
-         // TODO: replace the line below by a meaningful return statement
-         DUNE_THROW(Dune::NotImplemented, "Todo: implement liquidIsCompressible()");
-     }
+     { true; }
 
      /*!
       * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the component.
       */
      static Scalar molarMass()
      {
-         // TODO: replace the line below by a meaningful return statement
-         DUNE_THROW(Dune::NotImplemented, "Todo: implement molar mass");
+        // TODO: replace the line below by a meaningful return statement
+        DUNE_THROW(Dune::NotImplemented, "Todo: implement molar mass");
      }
 
      /*!
diff --git a/tutorial/ex3/components/myincompressiblecomponent.hh b/tutorial/ex3/components/myincompressiblecomponent.hh
index b37266ceac..b175492430 100644
--- a/tutorial/ex3/components/myincompressiblecomponent.hh
+++ b/tutorial/ex3/components/myincompressiblecomponent.hh
@@ -54,10 +54,7 @@ public:
      * \brief Returns true if the liquid phase is assumed to be compressible
      */
     static constexpr bool liquidIsCompressible()
-    {
-        // TODO: replace the line below by a meaningful return statement
-        DUNE_THROW(Dune::NotImplemented, "Todo: implement liquidIsCompressible()");
-    }
+    { return false; }
 
     /*!
      * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the component.
-- 
GitLab