From 9c41e6a13be66f4e7f51b7c169d96e991831e499 Mon Sep 17 00:00:00 2001 From: Max Kahnt <max.kahnt@fu-berlin.de> Date: Mon, 25 Sep 2017 14:08:13 +0200 Subject: [PATCH] Fix includes, use hybrid loop. --- dune/matrix-vector/genericvectortools.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dune/matrix-vector/genericvectortools.hh b/dune/matrix-vector/genericvectortools.hh index f4143f8..493c6c6 100644 --- a/dune/matrix-vector/genericvectortools.hh +++ b/dune/matrix-vector/genericvectortools.hh @@ -5,8 +5,10 @@ \brief Various tools for working with istl vectors of arbitrary nesting depth */ -#include <iostream> #include <dune/common/fvector.hh> +#include <dune/common/hybridutilities.hh> +#include <dune/matrix-vector/algorithm.hh> +#include <iostream> /** \brief Various tools for working with istl vectors of arbitrary nesting depth @@ -33,8 +35,7 @@ void truncate(Vector& v, const BitVector& tr) { template <class Vector> struct Helper { static void writeBinary(std::ostream& s, const Vector& v) { - for (auto&& vi : v) - Generic::writeBinary(s, vi); + Hybrid::forEach(v, [&s](auto&& vi) { Generic::writeBinary(s, vi); }); } template <class BitVector> -- GitLab