From: Jean-Paul Pelteret Date: Thu, 2 May 2019 17:31:34 +0000 (+0200) Subject: Add a convenience function to make IteratorRange objects X-Git-Tag: v9.1.0-rc1~126^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bb0f116bb1787dc35ab528982794e1a61ff2a18;p=dealii.git Add a convenience function to make IteratorRange objects --- diff --git a/include/deal.II/base/iterator_range.h b/include/deal.II/base/iterator_range.h index d2b054cb78..a90266a88c 100644 --- a/include/deal.II/base/iterator_range.h +++ b/include/deal.II/base/iterator_range.h @@ -19,6 +19,8 @@ #include +#include + #include @@ -251,6 +253,23 @@ private: }; + +/** + * Create an object of type IteratorRange given the beginning and + * end iterator. + * + * @author Jean-Paul Pelteret, 2019 + */ +template +IteratorRange +make_iterator_range(const BaseIterator & begin, + const typename identity::type &end) +{ + IteratorRange ir(begin, end); + return ir; +} + + // ------------------- template member functions