From 7841c8832cf0aa5206002fed797a2479fe52844b Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 15 Jan 2013 20:47:38 +0000 Subject: [PATCH] Add assert. git-svn-id: https://svn.dealii.org/trunk@28072 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/utilities.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deal.II/include/deal.II/base/utilities.h b/deal.II/include/deal.II/base/utilities.h index 54ef56638f..e9a2933fc4 100644 --- a/deal.II/include/deal.II/base/utilities.h +++ b/deal.II/include/deal.II/base/utilities.h @@ -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) -- 2.39.5