]> https://gitweb.dealii.org/ - dealii.git/commitdiff
work around gcc 4.8.5 behavior in GridTools::Cache 7772/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 1 Mar 2019 17:00:40 +0000 (10:00 -0700)
committerTimo Heister <timo.heister@gmail.com>
Fri, 1 Mar 2019 17:00:40 +0000 (10:00 -0700)
fixes #7771

source/grid/grid_tools_cache.cc

index 52f664b01aec7eb2ae62a6b69aa4b0555f69ecd0..d1098c69862df28e77dc3f6d7fea8e3ec18fd5b6 100644 (file)
@@ -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<spacedim>       bbox =
-          GridTools::compute_bounding_box(*tria, locally_owned_cell_predicate);
+        std::function<bool(
+          const typename Triangulation<dim, spacedim>::active_cell_iterator &)>
+          ptr(locally_owned_cell_predicate);
+
+        const BoundingBox<spacedim> bbox =
+          GridTools::compute_bounding_box(get_triangulation(), ptr);
 
 
         std::vector<BoundingBox<spacedim>> bbox_v(1, bbox);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.