From: Daniel Arndt Date: Mon, 1 Jun 2020 00:33:43 +0000 (-0400) Subject: Revert "disable using c++ 20 iota-view and always use boost" X-Git-Tag: v9.3.0-rc1~1498^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10437%2Fhead;p=dealii.git Revert "disable using c++ 20 iota-view and always use boost" This reverts commit cdb6acdeba1684a372859b414657f3dc3f802cd3. --- 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