From 174bdf7e512ba074b45e588bec7c52635f17e337 Mon Sep 17 00:00:00 2001
From: Elias Pipping <elias.pipping@fu-berlin.de>
Date: Sat, 15 Oct 2016 15:20:19 +0200
Subject: [PATCH] [Build]   Fix compilation on gcc 4.9.2

---
 src/spatial-solving/fixedpointiterator.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/spatial-solving/fixedpointiterator.cc b/src/spatial-solving/fixedpointiterator.cc
index d17fd113..a8c03459 100644
--- a/src/spatial-solving/fixedpointiterator.cc
+++ b/src/spatial-solving/fixedpointiterator.cc
@@ -83,7 +83,12 @@ FixedPointIterator<Factory, Updaters, ErrorNorm>::run(
 
   updaters.rate_->postProcess(velocityIterate);
 
-  return { fixedPointIteration, multigridIterations };
+  // Cannot use return { fixedPointIteration, multigridIterations };
+  // with gcc 4.9.2, see also http://stackoverflow.com/a/37777814/179927
+  FixedPointIterationCounter ret;
+  ret.iterations = fixedPointIteration;
+  ret.multigridIterations = multigridIterations;
+  return ret;
 }
 
 std::ostream &operator<<(std::ostream &stream,
-- 
GitLab