diff --git a/opm/grid/cpgrid/Entity.hpp b/opm/grid/cpgrid/Entity.hpp index dbc1735aa..b441789f4 100644 --- a/opm/grid/cpgrid/Entity.hpp +++ b/opm/grid/cpgrid/Entity.hpp @@ -332,6 +332,13 @@ namespace Dune } }; } // namespace cpgrid + +#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 7) + template + auto referenceElement(const Dune::cpgrid::Entity& entity) -> decltype(referenceElement(entity.type())) + { return referenceElement(entity.type()); } +#endif + } // namespace Dune // now we include the Iterators.hh We need to do this here because for hbegin/hend the compiler