]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
FullMatrix as friend
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2002 11:04:14 +0000 (11:04 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2002 11:04:14 +0000 (11:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@5506 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/vector2d.h

index 450683daf42b48bd436dde07591d42c7f660851a..ba5826cbb9856373ca3eeae455a8a32f2ac4e50c 100644 (file)
@@ -77,12 +77,7 @@ class vector2d : public Subscriptor
     vector2d<T>& operator = (const vector2d<T>& src);
     
                                     /**
-                                     * Destructor. Free allocated memory.
-                                     */
-    ~vector2d ();
-    
-                                    /**
-                                     * Assignment operator.
+                                     * Copy operator.
                                      * Copy all elements of @p{src}
                                      * into the array. The size is
                                      * adjusted if needed.
@@ -93,6 +88,11 @@ class vector2d : public Subscriptor
                                      */
     template<typename T2>
     vector2d<T>& operator = (const vector2d<T2> &src);
+                                     
+                                    /**
+                                     * Destructor. Free allocated memory.
+                                     */
+    ~vector2d ();
     
                                     /**
                                      * Set dimension to $m\times n$
@@ -225,6 +225,16 @@ class vector2d : public Subscriptor
                                      * Number of Rows
                                      */
     unsigned int num_rows;
+                                    /**
+                                     * Friend declaration needed for
+                                     * inter-type copy operator.
+                                     */
+    template <typename T2> friend class vector2d;
+    
+                                    /**
+                                     * This is unfortunately needed.
+                                     */
+    template <typename T2> friend class FullMatrix;    
 };
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.