From: Guido Kanschat Date: Fri, 4 Sep 1998 09:01:49 +0000 (+0000) Subject: operator = added to SmartPointer X-Git-Tag: v8.0.0~22704 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b4ed1d185fd9666ee2a64c74587a3cacc65af8d;p=dealii.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. */