From: David Wells Date: Sun, 16 Aug 2015 13:41:19 +0000 (-0400) Subject: Use 'Constness' as a template variable name. X-Git-Tag: v8.4.0-rc2~585^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=949eb3bf06feece3b83e1c5aed8b2a084f34f4dd;p=dealii.git Use 'Constness' as a template variable name. This is the convention used elsewhere in the library. Previously this file used 'constness'. --- diff --git a/include/deal.II/lac/block_vector_base.h b/include/deal.II/lac/block_vector_base.h index 1428d7f775..7354de8013 100644 --- a/include/deal.II/lac/block_vector_base.h +++ b/include/deal.II/lac/block_vector_base.h @@ -115,7 +115,7 @@ namespace internal * Declaration of the general template of a structure which is used to * determine some types based on the template arguments of other classes. */ - template + template struct Types { }; @@ -222,10 +222,10 @@ namespace internal * * @author Wolfgang Bangerth, 2001 */ - template + template class Iterator : public std::iterator::value_type> + typename Types::value_type> { private: /** @@ -246,7 +246,7 @@ namespace internal * number. */ typedef - typename Types::value_type + typename Types::value_type value_type; /** @@ -260,7 +260,7 @@ namespace internal typedef value_type *pointer; typedef - typename Types::dereference_type + typename Types::dereference_type dereference_type; /** @@ -268,14 +268,14 @@ namespace internal * depending on the second template parameter). */ typedef - typename Types::BlockVector + typename Types::BlockVector BlockVector; /** * Construct an iterator from a vector to which we point and the global * index of the element pointed to. * - * Depending on the value of the constness template argument of + * Depending on the value of the Constness template argument of * this class, the first argument of this constructor is either is a * const or non-const reference. */ @@ -285,7 +285,7 @@ namespace internal /** * Copy constructor. */ - Iterator (const Iterator &c); + Iterator (const Iterator &c); /** * Copy constructor for conversion between iterators with different @@ -314,7 +314,7 @@ namespace internal Iterator &operator = (const Iterator &c); /** - * Dereferencing operator. If the template argument constness + * Dereferencing operator. If the template argument Constness * is true, then no writing to the result is possible, making * this a const_iterator. */ @@ -467,7 +467,7 @@ namespace internal private: /** * Pointer to the block vector object to which this iterator points. - * Depending on the value of the constness template argument of + * Depending on the value of the Constness template argument of * this class, this is a const or non-const pointer. */ BlockVector *parent; @@ -1019,10 +1019,10 @@ namespace internal namespace BlockVectorIterators { - template + template inline - Iterator:: - Iterator (const Iterator &c) + Iterator:: + Iterator (const Iterator &c) : parent (c.parent), global_index (c.global_index), @@ -1034,9 +1034,9 @@ namespace internal - template + template inline - Iterator:: + Iterator:: Iterator (const InverseConstnessIterator &c) : parent (const_cast(c.parent)), @@ -1046,19 +1046,19 @@ namespace internal next_break_forward (c.next_break_forward), next_break_backward (c.next_break_backward) { - // if constness==false, then the // constness of the iterator we + // if Constness==false, then the // got is true and we are trying // to cast away the // constness. disallow this - Assert (constness==true, ExcCastingAwayConstness()); + Assert (Constness==true, ExcCastingAwayConstness()); } - template + template inline - Iterator:: + Iterator:: Iterator (BlockVector &parent, const size_type global_index, const size_type current_block, @@ -1077,10 +1077,10 @@ namespace internal - template + template inline - Iterator & - Iterator:: + Iterator & + Iterator:: operator = (const Iterator &c) { parent = c.parent; @@ -1095,20 +1095,20 @@ namespace internal - template + template inline - typename Iterator::dereference_type - Iterator::operator * () const + typename Iterator::dereference_type + Iterator::operator * () const { return parent->block(current_block)(index_within_block); } - template + template inline - typename Iterator::dereference_type - Iterator::operator [] (const difference_type d) const + typename Iterator::dereference_type + Iterator::operator [] (const difference_type d) const { // if the index pointed to is // still within the block we @@ -1131,10 +1131,10 @@ namespace internal - template + template inline - Iterator & - Iterator::operator ++ () + Iterator & + Iterator::operator ++ () { move_forward (); return *this; @@ -1142,10 +1142,10 @@ namespace internal - template + template inline - Iterator - Iterator::operator ++ (int) + Iterator + Iterator::operator ++ (int) { const Iterator old_value = *this; move_forward (); @@ -1154,10 +1154,10 @@ namespace internal - template + template inline - Iterator & - Iterator::operator -- () + Iterator & + Iterator::operator -- () { move_backward (); return *this; @@ -1165,10 +1165,10 @@ namespace internal - template + template inline - Iterator - Iterator::operator -- (int) + Iterator + Iterator::operator -- (int) { const Iterator old_value = *this; move_backward (); @@ -1177,10 +1177,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator == (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1190,10 +1190,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator == (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1203,10 +1203,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator != (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1216,10 +1216,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator != (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1229,10 +1229,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator < (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1242,10 +1242,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator < (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1255,10 +1255,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator <= (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1268,10 +1268,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator <= (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1281,10 +1281,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator > (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1294,10 +1294,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator > (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1307,10 +1307,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator >= (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1320,10 +1320,10 @@ namespace internal - template + template inline bool - Iterator:: + Iterator:: operator >= (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1333,10 +1333,10 @@ namespace internal - template + template inline - typename Iterator::difference_type - Iterator:: + typename Iterator::difference_type + Iterator:: operator - (const Iterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1347,10 +1347,10 @@ namespace internal - template + template inline - typename Iterator::difference_type - Iterator:: + typename Iterator::difference_type + Iterator:: operator - (const InverseConstnessIterator &i) const { Assert (parent == i.parent, ExcPointerToDifferentVectors()); @@ -1361,10 +1361,10 @@ namespace internal - template + template inline - Iterator - Iterator:: + Iterator + Iterator:: operator + (const difference_type &d) const { // if the index pointed to is @@ -1386,10 +1386,10 @@ namespace internal - template + template inline - Iterator - Iterator:: + Iterator + Iterator:: operator - (const difference_type &d) const { // if the index pointed to is @@ -1411,10 +1411,10 @@ namespace internal - template + template inline - Iterator & - Iterator:: + Iterator & + Iterator:: operator += (const difference_type &d) { // if the index pointed to is @@ -1439,10 +1439,10 @@ namespace internal - template + template inline - Iterator & - Iterator:: + Iterator & + Iterator:: operator -= (const difference_type &d) { // if the index pointed to is @@ -1466,8 +1466,8 @@ namespace internal } - template - Iterator:: + template + Iterator:: Iterator (BlockVector &parent, const size_type global_index) : @@ -1507,9 +1507,9 @@ namespace internal - template + template void - Iterator::move_forward () + Iterator::move_forward () { if (global_index != next_break_forward) ++index_within_block; @@ -1541,9 +1541,9 @@ namespace internal - template + template void - Iterator::move_backward () + Iterator::move_backward () { if (global_index != next_break_backward) --index_within_block;