]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure is_contiguous() compares addresses, not values, of array objects.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 29 Mar 2018 21:33:19 +0000 (15:33 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 29 Mar 2018 21:33:19 +0000 (15:33 -0600)
include/deal.II/base/array_view.h

index 700956d0b6375ba2af7984ee37141d7d8431cb8b..50ffacbb00818c5e5cd8aca06c0f83418cc72052 100644 (file)
@@ -439,7 +439,7 @@ namespace internal
     {
       const auto n = std::distance(first, last);
       for (typename std::decay<decltype(n)>::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;
     }

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.