From: wolf Date: Mon, 1 Oct 2001 09:06:38 +0000 (+0000) Subject: Simplify cross-casting constness. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c5798404804036673869316c9d0db4edf7b77d4;p=dealii-svn.git Simplify cross-casting constness. git-svn-id: https://svn.dealii.org/trunk@5124 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_vector.h b/deal.II/lac/include/lac/block_vector.h index 25bdd4bb68..643a8b2b26 100644 --- a/deal.II/lac/include/lac/block_vector.h +++ b/deal.II/lac/include/lac/block_vector.h @@ -273,8 +273,7 @@ namespace BlockVectorIterators * converting a constant to a * non-constant iterator. */ - template - Iterator (const Iterator &c); + Iterator (const InverseConstnessIterator &c); private: /** @@ -1260,10 +1259,9 @@ namespace BlockVectorIterators template - template inline Iterator:: - Iterator (const Iterator &c) + Iterator (const InverseConstnessIterator &c) : parent (c.parent), global_index (c.global_index), @@ -1272,8 +1270,12 @@ namespace BlockVectorIterators next_break_forward (c.next_break_forward), next_break_backward (c.next_break_backward) { - Assert (! ((constness==false) && (constness2==true)), - ExcCastingAwayConstness()); + // if constness==false, then the + // constness of the iterator we + // got is true and we are trying + // to cast away the + // constness. disallow this + Assert (constness==false, ExcCastingAwayConstness()); };