From: Wolfgang Bangerth Date: Thu, 29 Mar 2018 21:33:19 +0000 (-0600) Subject: Make sure is_contiguous() compares addresses, not values, of array objects. X-Git-Tag: v9.0.0-rc1~265^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c5afa052ce23656078c43794c66913d7b88e540;p=dealii.git Make sure is_contiguous() compares addresses, not values, of array objects. --- diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index 700956d0b6..50ffacbb00 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -439,7 +439,7 @@ namespace internal { const auto n = std::distance(first, last); for (typename std::decay::type i = 0; i < n; ++i) - if (*(std::next(first, i)) != *(std::next(std::addressof(*first), i))) + if (std::addressof(*(std::next(first, i))) != std::next(std::addressof(*first), i)) return false; return true; }