From ab0183f6d8267f8080fdf7fd44fe917bd9ba1828 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 11 Dec 2017 14:06:52 +0100 Subject: [PATCH] quad.hpp: simplify the error prevention mechanism for Dune::className() there is no need to include quad.hpp before dune's classname.hh. Instead we just include classname.hh into quad.hpp and it will work unconditionally. --- opm/material/common/quad.hpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/opm/material/common/quad.hpp b/opm/material/common/quad.hpp index 539d1843a..1cea090a8 100644 --- a/opm/material/common/quad.hpp +++ b/opm/material/common/quad.hpp @@ -26,14 +26,6 @@ * \brief This file provides the infrastructure to use quad-precision * floating point values in the numerical models. */ -#if HAVE_DUNE_COMMON -#ifdef DUNE_CLASSNAME_HH -#error "Due to some trickery required for the linker, this file must be included _before_ Dune's classname.hh!" -#endif - -#include -#endif // HAVE_DUNE_COMMON - #if !defined OPM_COMMON_QUAD_HPP && HAVE_QUAD #define OPM_COMMON_QUAD_HPP @@ -331,14 +323,14 @@ inline bool isinf(quad val) } // namespace std -#if HAVE_DUNE_COMMON // specialize Dune::className for __float128 since it former does not work properly with // __float128 (this is mainly the fault of GCC/libstdc++) +#include + namespace Dune { template <> inline std::string className<__float128>() { return "quad"; } } // namespace Dune -#endif // HAVE_DUNE_COMMON #endif // OPM_COMMON_QUAD_HPP