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.
This commit is contained in:
parent
300bbe4fe8
commit
ab0183f6d8
@ -26,14 +26,6 @@
|
|||||||
* \brief This file provides the infrastructure to use quad-precision
|
* \brief This file provides the infrastructure to use quad-precision
|
||||||
* floating point values in the numerical models.
|
* 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 <dune/common/classname.hh>
|
|
||||||
#endif // HAVE_DUNE_COMMON
|
|
||||||
|
|
||||||
#if !defined OPM_COMMON_QUAD_HPP && HAVE_QUAD
|
#if !defined OPM_COMMON_QUAD_HPP && HAVE_QUAD
|
||||||
#define OPM_COMMON_QUAD_HPP
|
#define OPM_COMMON_QUAD_HPP
|
||||||
|
|
||||||
@ -331,14 +323,14 @@ inline bool isinf(quad val)
|
|||||||
|
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
||||||
#if HAVE_DUNE_COMMON
|
|
||||||
// specialize Dune::className for __float128 since it former does not work properly with
|
// specialize Dune::className for __float128 since it former does not work properly with
|
||||||
// __float128 (this is mainly the fault of GCC/libstdc++)
|
// __float128 (this is mainly the fault of GCC/libstdc++)
|
||||||
|
#include <dune/common/classname.hh>
|
||||||
|
|
||||||
namespace Dune {
|
namespace Dune {
|
||||||
template <>
|
template <>
|
||||||
inline std::string className<__float128>()
|
inline std::string className<__float128>()
|
||||||
{ return "quad"; }
|
{ return "quad"; }
|
||||||
} // namespace Dune
|
} // namespace Dune
|
||||||
#endif // HAVE_DUNE_COMMON
|
|
||||||
|
|
||||||
#endif // OPM_COMMON_QUAD_HPP
|
#endif // OPM_COMMON_QUAD_HPP
|
||||||
|
Loading…
Reference in New Issue
Block a user