From 2d63d436c1d46b26007d26bc71b10597ef7c21ec Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 1 Oct 2001 09:06:38 +0000 Subject: [PATCH] Simplify cross-casting constness. git-svn-id: https://svn.dealii.org/trunk@5124 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/block_vector.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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()); }; -- 2.39.5