]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Disambiguate one of the WorkStream::run() overloads. 18522/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 30 May 2025 17:32:32 +0000 (11:32 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 30 May 2025 17:34:17 +0000 (11:34 -0600)
include/deal.II/base/work_stream.h

index 3135a62e92041f78d11a976486bcaf7339cd9655..c62bc450d82759399663e3b294262c675168a99e 100644 (file)
@@ -1579,12 +1579,16 @@ namespace WorkStream
    * both of which return iterators to elements that form the bounds of the
    * range.
    */
-  template <typename Worker,
-            typename Copier,
-            typename IteratorRangeType,
-            typename ScratchData,
-            typename CopyData,
-            typename = std::enable_if_t<has_begin_and_end<IteratorRangeType>>>
+  template <
+    typename Worker,
+    typename Copier,
+    typename IteratorRangeType,
+    typename ScratchData,
+    typename CopyData,
+    typename = std::enable_if_t<
+      has_begin_and_end<IteratorRangeType> &&
+      !std::is_same_v<IteratorRangeType,
+                      IteratorRange<typename IteratorRangeType::iterator>>>>
   void
   run(IteratorRangeType  iterator_range,
       Worker             worker,
@@ -1813,11 +1817,15 @@ namespace WorkStream
    * both of which return iterators to elements that form the bounds of the
    * range.
    */
-  template <typename MainClass,
-            typename IteratorRangeType,
-            typename ScratchData,
-            typename CopyData,
-            typename = std::enable_if_t<has_begin_and_end<IteratorRangeType>>>
+  template <
+    typename MainClass,
+    typename IteratorRangeType,
+    typename ScratchData,
+    typename CopyData,
+    typename = std::enable_if_t<
+      has_begin_and_end<IteratorRangeType> &&
+      !std::is_same_v<IteratorRangeType,
+                      IteratorRange<typename IteratorRangeType::iterator>>>>
   void
   run(
     IteratorRangeType iterator_range,

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.