]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add iterator traits to hp::CollectionIterator 12982/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 22 Nov 2021 14:50:59 +0000 (15:50 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 22 Nov 2021 14:50:59 +0000 (15:50 +0100)
include/deal.II/hp/collection.h

index ebce43e177ca76b6fd276a345f983d2efe318e5f..67b92615d68c766a0b163bf95ac81b03e5e64750 100644 (file)
@@ -293,4 +293,18 @@ namespace hp
 
 DEAL_II_NAMESPACE_CLOSE
 
+namespace std
+{
+  /**
+   * Iterator traits for hp::CollectionIterator.
+   */
+  template <class T>
+  struct iterator_traits<dealii::hp::CollectionIterator<T>>
+  {
+    using iterator_category = random_access_iterator_tag;
+    using value_type        = T;
+    using difference_type   = std::ptrdiff_t;
+  };
+} // namespace std
+
 #endif

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.