]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "disable using c++ 20 iota-view and always use boost" 10437/head
authorDaniel Arndt <arndtd@ornl.gov>
Mon, 1 Jun 2020 00:33:43 +0000 (20:33 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 1 Jun 2020 00:33:43 +0000 (20:33 -0400)
This reverts commit cdb6acdeba1684a372859b414657f3dc3f802cd3.

include/deal.II/base/std_cxx20/iota_view.h

index d29695db92672e995e94dc44cf8348202b21476a..c190efc302a16e7543f4fdcef24100616b87e40a 100644 (file)
 
 #include <deal.II/base/config.h>
 
-// For now we unconditionally use the boost implementation, even though gcc-10
-// has an implementation (which does not contain the iterator typedef):
-#include <boost/range/irange.hpp>
+#ifdef DEAL_II_HAVE_CXX20
+#  include <ranges>
+#else
+#  include <boost/range/irange.hpp>
+#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 <typename IncrementableType, typename /*BoundType*/>
     using iota_view = boost::integer_range<IncrementableType>;
+#else
+    using std::ranges::iota_view;
+#endif
   } // namespace ranges
 } // namespace std_cxx20
 

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.