From c49a2c9ff1195005c953231be7107a2403a14f55 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 31 May 2020 20:33:43 -0400 Subject: [PATCH] Revert "disable using c++ 20 iota-view and always use boost" This reverts commit cdb6acdeba1684a372859b414657f3dc3f802cd3. --- include/deal.II/base/std_cxx20/iota_view.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/std_cxx20/iota_view.h b/include/deal.II/base/std_cxx20/iota_view.h index d29695db92..c190efc302 100644 --- a/include/deal.II/base/std_cxx20/iota_view.h +++ b/include/deal.II/base/std_cxx20/iota_view.h @@ -17,9 +17,11 @@ #include -// For now we unconditionally use the boost implementation, even though gcc-10 -// has an implementation (which does not contain the iterator typedef): -#include +#ifdef DEAL_II_HAVE_CXX20 +# include +#else +# include +#endif DEAL_II_NAMESPACE_OPEN @@ -27,6 +29,7 @@ namespace std_cxx20 { namespace ranges { +#ifndef DEAL_II_HAVE_CXX20 /** * A poor-man's implementation of std::ranges::iota_view using * boost's integer_range class. The two classes are not completely @@ -41,6 +44,9 @@ namespace std_cxx20 */ template using iota_view = boost::integer_range; +#else + using std::ranges::iota_view; +#endif } // namespace ranges } // namespace std_cxx20 -- 2.39.5