From 5b4ed1d185fd9666ee2a64c74587a3cacc65af8d Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Fri, 4 Sep 1998 09:01:49 +0000 Subject: [PATCH] operator = added to SmartPointer git-svn-id: https://svn.dealii.org/trunk@553 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/subscriptor.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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. */ -- 2.39.5