]> https://gitweb.dealii.org/ - dealii.git/commitdiff
disable using c++ 20 iota-view and always use boost 10432/head
authorTimo Heister <timo.heister@gmail.com>
Sun, 31 May 2020 21:27:02 +0000 (17:27 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sun, 31 May 2020 21:27:02 +0000 (17:27 -0400)
gcc-10 does not contain the ``iterator`` typedef, which makes the usage
somewhat incompatible to what we want. For now, disable the c++20
support.

see #10426

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

index c190efc302a16e7543f4fdcef24100616b87e40a..d29695db92672e995e94dc44cf8348202b21476a 100644 (file)
 
 #include <deal.II/base/config.h>
 
-#ifdef DEAL_II_HAVE_CXX20
-#  include <ranges>
-#else
-#  include <boost/range/irange.hpp>
-#endif
+// 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>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -29,7 +27,6 @@ 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
@@ -44,9 +41,6 @@ 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.