From: Wolfgang Bangerth Date: Thu, 8 Jun 2023 21:04:18 +0000 (-0600) Subject: Enable make_array_view() also for C++20-style contiguous iterators. X-Git-Tag: v9.5.0-rc1~132^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=072f2fe9262449b7a6152117beaa8d41e38a3491;p=dealii.git Enable make_array_view() also for C++20-style contiguous iterators. --- diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index 67e69e6c2d..568ee71b12 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -705,7 +705,13 @@ make_array_view(const Iterator begin, const Iterator end) { static_assert( std::is_same::iterator_category, - typename std::random_access_iterator_tag>::value, + typename std::random_access_iterator_tag>::value +#ifdef DEAL_II_HAVE_CXX20 + || + std::is_same::iterator_category, + typename std::contiguous_iterator_tag>::value +#endif + , "The provided iterator needs to be a random access iterator."); Assert(begin <= end, ExcMessage(