]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add assert.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 15 Jan 2013 20:47:38 +0000 (20:47 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 15 Jan 2013 20:47:38 +0000 (20:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@28072 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 54ef56638fd69ae9c4b01c5684de80e0822f5a31..e9a2933fc4be98cdf69d4f474bdf2d205c1dbc37 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
+//    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -721,6 +721,9 @@ namespace Utilities
                const T    &val,
                const Comp  comp)
   {
+    Assert (last >= first,
+           ExcMessage ("The given iterators do not satisfy the proper ordering."));
+
     unsigned int len = last-first;
 
     if (len==0)

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.