]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Relax assertion.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Jan 2013 03:36:12 +0000 (03:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Jan 2013 03:36:12 +0000 (03:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@28073 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/utilities.h

index e9a2933fc4be98cdf69d4f474bdf2d205c1dbc37..c2bf55e65ab4e19274adcc9d3e9bda30e88ae38b 100644 (file)
@@ -721,7 +721,10 @@ namespace Utilities
                const T    &val,
                const Comp  comp)
   {
-    Assert (last >= first,
+    // verify that the two iterators are properly ordered. since
+    // we need operator- for the iterator type anyway, do the
+    // test as follows, rather than via 'last >= first'
+    Assert (last - first >= 0,
            ExcMessage ("The given iterators do not satisfy the proper ordering."));
 
     unsigned int len = last-first;

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.