From: wolf Date: Mon, 18 Mar 2002 13:09:02 +0000 (+0000) Subject: Remove semicolons to work around a bug in Sun Forte. Testcase: X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdccc20319d3df32f352b926623f748f9e56db8f;p=dealii-svn.git Remove semicolons to work around a bug in Sun Forte. Testcase: /* ---------------------------------- */ /* Problem 1 -- extraneous semicolon? */ namespace NS1 { template void test () {}; }; Avoid friend declaration of typedefs. Testcase: /* -------------------------------- */ /* Problem 6 -- friend and typedefs */ class T3; class T4 { typedef T3 Tloc; friend class Tloc; }; git-svn-id: https://svn.dealii.org/trunk@5571 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 7f268eb41d..c1268fb9e5 100644 --- a/deal.II/lac/include/lac/block_vector.h +++ b/deal.II/lac/include/lac/block_vector.h @@ -563,7 +563,13 @@ namespace BlockVectorIterators */ void move_backward (); - friend class InverseConstnessIterator; + /** + * Make all other iterators + * friend, i.e. including the + * one with opposite constness. + */ + template + friend class Iterator; }; }; @@ -1126,11 +1132,11 @@ class BlockVector unsigned int num_blocks; /** - * Make the iterator class a - * friend. + * Make the iterator classes + * friends. */ - friend class iterator; - friend class const_iterator; + template + friend class BlockVectorIterators::Iterator; template friend class BlockVector; }; @@ -1259,7 +1265,7 @@ namespace BlockVectorIterators index_within_block (c.index_within_block), next_break_forward (c.next_break_forward), next_break_backward (c.next_break_backward) - {}; + {} @@ -1281,7 +1287,7 @@ namespace BlockVectorIterators // to cast away the // constness. disallow this Assert (constness==true, ExcCastingAwayConstness()); - }; + } @@ -1302,7 +1308,7 @@ namespace BlockVectorIterators next_break_forward (next_break_forward), next_break_backward (next_break_backward) { - }; + } @@ -1320,7 +1326,7 @@ namespace BlockVectorIterators next_break_backward = c.next_break_backward; return *this; - }; + } @@ -1336,7 +1342,7 @@ namespace BlockVectorIterators // reference to a temporary reference p = parent->block(current_block)(index_within_block); return p; - }; + } @@ -1352,7 +1358,7 @@ namespace BlockVectorIterators // reference to a temporary reference p = parent->block(current_block)(index_within_block); return &p; - }; + } @@ -1383,7 +1389,7 @@ namespace BlockVectorIterators // class as well. reference p = (*parent)(global_index+d); return p; - }; + } @@ -1394,7 +1400,7 @@ namespace BlockVectorIterators { move_forward (); return *this; - }; + } @@ -1406,7 +1412,7 @@ namespace BlockVectorIterators const Iterator old_value = *this; move_forward (); return old_value; - }; + } @@ -1417,7 +1423,7 @@ namespace BlockVectorIterators { move_backward (); return *this; - }; + } @@ -1429,7 +1435,7 @@ namespace BlockVectorIterators const Iterator old_value = *this; move_backward (); return old_value; - }; + } @@ -1441,7 +1447,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index == i.global_index); - }; + } @@ -1453,7 +1459,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index == i.global_index); - }; + } @@ -1465,7 +1471,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index != i.global_index); - }; + } @@ -1477,7 +1483,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index != i.global_index); - }; + } @@ -1489,7 +1495,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index < i.global_index); - }; + } @@ -1501,7 +1507,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index < i.global_index); - }; + } @@ -1513,7 +1519,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index <= i.global_index); - }; + } @@ -1525,7 +1531,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index <= i.global_index); - }; + } @@ -1537,7 +1543,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index > i.global_index); - }; + } @@ -1549,7 +1555,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index > i.global_index); - }; + } @@ -1561,8 +1567,8 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index >= i.global_index); - }; - + } + template @@ -1573,7 +1579,7 @@ namespace BlockVectorIterators Assert (parent == i.parent, ExcPointerToDifferentVectors()); return (global_index >= i.global_index); - }; + } @@ -1586,7 +1592,7 @@ namespace BlockVectorIterators return (static_cast(global_index) - static_cast(i.global_index)); - }; + } @@ -1599,7 +1605,7 @@ namespace BlockVectorIterators return (static_cast(global_index) - static_cast(i.global_index)); - }; + } @@ -1623,7 +1629,7 @@ namespace BlockVectorIterators // have to seek new block // anyway return Iterator (*parent, global_index+d); - }; + } @@ -1647,7 +1653,7 @@ namespace BlockVectorIterators // have to seek new block // anyway return Iterator (*parent, global_index-d); - }; + } @@ -1674,7 +1680,7 @@ namespace BlockVectorIterators *this = Iterator (*parent, global_index+d); return *this; - }; + } @@ -1701,7 +1707,7 @@ namespace BlockVectorIterators *this = Iterator (*parent, global_index-d); return *this; - }; + } }; diff --git a/deal.II/lac/include/lac/block_vector.templates.h b/deal.II/lac/include/lac/block_vector.templates.h index 1a8acb41b6..15762fcbc5 100644 --- a/deal.II/lac/include/lac/block_vector.templates.h +++ b/deal.II/lac/include/lac/block_vector.templates.h @@ -601,7 +601,7 @@ namespace BlockVectorIterators next_break_backward = global_index; next_break_forward = static_cast(-1); }; - }; + } @@ -635,7 +635,7 @@ namespace BlockVectorIterators }; ++global_index; - }; + } @@ -672,7 +672,7 @@ namespace BlockVectorIterators }; --global_index; - }; + } };