From: guido Date: Fri, 4 Sep 1998 09:01:49 +0000 (+0000) Subject: operator = added to SmartPointer X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a77d06ff30a6a5723f279d1fb709a98336a2f0a2;p=dealii-svn.git operator = added to SmartPointer git-svn-id: https://svn.dealii.org/trunk@553 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/subscriptor.h b/deal.II/base/include/base/subscriptor.h index 5592ee007f..85efd87440 100644 --- a/deal.II/base/include/base/subscriptor.h +++ b/deal.II/base/include/base/subscriptor.h @@ -169,7 +169,18 @@ class SmartPointer { t->unsubscribe(); } - + /** + * Assignment operator. Change of + * subscription is necessary. + */ + SmartPointer& operator=(T* tt) + { + t->unsubscribe(); + t = tt; + tt->subscribe(); + } + + /** * Conversion to normal pointer. */