From: Timo Heister Date: Fri, 1 Mar 2019 17:00:40 +0000 (-0700) Subject: work around gcc 4.8.5 behavior in GridTools::Cache X-Git-Tag: v9.1.0-rc1~311^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59a3884d61e5257e003135b719d93abb97b649f9;p=dealii.git work around gcc 4.8.5 behavior in GridTools::Cache fixes #7771 --- diff --git a/source/grid/grid_tools_cache.cc b/source/grid/grid_tools_cache.cc index 52f664b01a..d1098c6986 100644 --- a/source/grid/grid_tools_cache.cc +++ b/source/grid/grid_tools_cache.cc @@ -167,9 +167,16 @@ namespace GridTools // TO DO: the locally owned portion of the domain // might consists of more separate pieces: a single // bounding box might not always be the best choice. + + // Note: we create the local variable ptr here, because gcc 4.8.5 + // fails to compile if we pass the variable directly. IteratorFilters::LocallyOwnedCell locally_owned_cell_predicate; - const BoundingBox bbox = - GridTools::compute_bounding_box(*tria, locally_owned_cell_predicate); + std::function::active_cell_iterator &)> + ptr(locally_owned_cell_predicate); + + const BoundingBox bbox = + GridTools::compute_bounding_box(get_triangulation(), ptr); std::vector> bbox_v(1, bbox);