From 59a3884d61e5257e003135b719d93abb97b649f9 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 1 Mar 2019 10:00:40 -0700 Subject: [PATCH] work around gcc 4.8.5 behavior in GridTools::Cache fixes #7771 --- source/grid/grid_tools_cache.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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); -- 2.39.5