]> https://gitweb.dealii.org/ - dealii.git/commitdiff
operator = added to SmartPointer
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 4 Sep 1998 09:01:49 +0000 (09:01 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 4 Sep 1998 09:01:49 +0000 (09:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@553 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/subscriptor.h

index 5592ee007f888262e50ffda2a56631ffe5e38a50..85efd8744010878bfa941aef4a2e9a56dd567401 100644 (file)
@@ -169,7 +169,18 @@ class SmartPointer
       {
        t->unsubscribe();
       }
-    
+                                  /**
+                                   * Assignment operator. Change of
+                                   * subscription is necessary.
+                                   */
+  SmartPointer<T>& operator=(T* tt)
+      {
+       t->unsubscribe();
+       t = tt;
+       tt->subscribe();
+      }
+  
+
                                     /**
                                      * Conversion to normal pointer.
                                      */

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.