]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compiling step-69 with gcc-10 and C++20 10426/head
authorDaniel Arndt <arndtd@ornl.gov>
Sun, 31 May 2020 04:42:04 +0000 (00:42 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Sun, 31 May 2020 04:42:04 +0000 (00:42 -0400)
examples/step-69/step-69.cc

index 645ef19477b5d462186839d9a2b3a297adcb249b..555bb335d9dabe277287d9cb85872aa91ea86202 100644 (file)
@@ -1258,10 +1258,7 @@ namespace Step69
         0, n_locally_relevant);
 
       const auto on_subranges = //
-        [&](
-          std_cxx20::ranges::iota_view<unsigned int, unsigned int>::iterator i1,
-          const std_cxx20::ranges::iota_view<unsigned int,
-                                             unsigned int>::iterator i2) {
+        [&](const auto i1, const auto i2) {
           for (const auto row_index :
                std_cxx20::ranges::iota_view<unsigned int, unsigned int>(*i1,
                                                                         *i2))
@@ -1923,10 +1920,7 @@ namespace Step69
                                "time_stepping - 1 compute d_ij");
 
       const auto on_subranges = //
-        [&](
-          std_cxx20::ranges::iota_view<unsigned int, unsigned int>::iterator i1,
-          const std_cxx20::ranges::iota_view<unsigned int,
-                                             unsigned int>::iterator i2) {
+        [&](const auto i1, const auto i2) {
           for (const auto i :
                std_cxx20::ranges::iota_view<unsigned int, unsigned int>(*i1,
                                                                         *i2))
@@ -2022,10 +2016,7 @@ namespace Step69
       // locally.
 
       const auto on_subranges = //
-        [&](
-          std_cxx20::ranges::iota_view<unsigned int, unsigned int>::iterator i1,
-          const std_cxx20::ranges::iota_view<unsigned int,
-                                             unsigned int>::iterator i2) {
+        [&](const auto i1, const auto i2) {
           double tau_max_on_subrange = std::numeric_limits<double>::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<unsigned int, unsigned int>::iterator i1,
-          const std_cxx20::ranges::iota_view<unsigned int,
-                                             unsigned int>::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<unsigned int, unsigned int>::iterator i1,
-          const std_cxx20::ranges::iota_view<unsigned int,
-                                             unsigned int>::iterator i2) {
+        [&](const auto i1, const auto i2) {
           double r_i_max_on_subrange = 0.;
           double r_i_min_on_subrange = std::numeric_limits<double>::infinity();
 
@@ -2451,10 +2436,7 @@ namespace Step69
 
     {
       const auto on_subranges = //
-        [&](
-          std_cxx20::ranges::iota_view<unsigned int, unsigned int>::iterator i1,
-          const std_cxx20::ranges::iota_view<unsigned int,
-                                             unsigned int>::iterator i2) {
+        [&](const auto i1, const auto i2) {
           for (const auto i : boost::make_iterator_range(i1, i2))
             {
               Assert(i < n_locally_owned, ExcInternalError());

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.