From 072f2fe9262449b7a6152117beaa8d41e38a3491 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 8 Jun 2023 15:04:18 -0600 Subject: [PATCH] Enable make_array_view() also for C++20-style contiguous iterators. --- include/deal.II/base/array_view.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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( -- 2.39.5