From 9a3b334b78c258e40107186a2ac3e5099359e5b9 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 31 May 2020 00:42:04 -0400 Subject: [PATCH] Fix compiling step-69 with gcc-10 and C++20 --- examples/step-69/step-69.cc | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/examples/step-69/step-69.cc b/examples/step-69/step-69.cc index 645ef19477..555bb335d9 100644 --- a/examples/step-69/step-69.cc +++ b/examples/step-69/step-69.cc @@ -1258,10 +1258,7 @@ namespace Step69 0, n_locally_relevant); const auto on_subranges = // - [&]( - std_cxx20::ranges::iota_view::iterator i1, - const std_cxx20::ranges::iota_view::iterator i2) { + [&](const auto i1, const auto i2) { for (const auto row_index : std_cxx20::ranges::iota_view(*i1, *i2)) @@ -1923,10 +1920,7 @@ namespace Step69 "time_stepping - 1 compute d_ij"); const auto on_subranges = // - [&]( - std_cxx20::ranges::iota_view::iterator i1, - const std_cxx20::ranges::iota_view::iterator i2) { + [&](const auto i1, const auto i2) { for (const auto i : std_cxx20::ranges::iota_view(*i1, *i2)) @@ -2022,10 +2016,7 @@ namespace Step69 // locally. const auto on_subranges = // - [&]( - std_cxx20::ranges::iota_view::iterator i1, - const std_cxx20::ranges::iota_view::iterator i2) { + [&](const auto i1, const auto i2) { double tau_max_on_subrange = std::numeric_limits::infinity(); for (const auto i : @@ -2110,11 +2101,8 @@ namespace Step69 TimerOutput::Scope scope(computing_timer, "time_stepping - 3 perform update"); - const auto on_subranges = - [&]( - std_cxx20::ranges::iota_view::iterator i1, - const std_cxx20::ranges::iota_view::iterator i2) { + const auto on_subranges = // + [&](const auto i1, const auto i2) { for (const auto i : boost::make_iterator_range(i1, i2)) { Assert(i < n_locally_owned, ExcInternalError()); @@ -2364,10 +2352,7 @@ namespace Step69 // global maxima and minima of the gradients. { const auto on_subranges = // - [&]( - std_cxx20::ranges::iota_view::iterator i1, - const std_cxx20::ranges::iota_view::iterator i2) { + [&](const auto i1, const auto i2) { double r_i_max_on_subrange = 0.; double r_i_min_on_subrange = std::numeric_limits::infinity(); @@ -2451,10 +2436,7 @@ namespace Step69 { const auto on_subranges = // - [&]( - std_cxx20::ranges::iota_view::iterator i1, - const std_cxx20::ranges::iota_view::iterator i2) { + [&](const auto i1, const auto i2) { for (const auto i : boost::make_iterator_range(i1, i2)) { Assert(i < n_locally_owned, ExcInternalError()); -- 2.39.5