* condition and the name of the exception as
* a char pointer.
*/
- void SetFields (const char* f,
- const int l,
+ void SetFields (const char *f,
+ const int l,
const char *func,
const char *c,
const char *e);
*/
SmartPointer();
+ /*
+ * Copy constructor for
+ * #SmartPointer#. We copy the object
+ * subscribed to from #tt#, but subscribe
+ * ourselves to it again.
+ */
+ SmartPointer (const SmartPointer<T> &tt);
+
/**
* Constructor taking a normal pointer.
* If possible, i.e. if the pointer
+template <typename T>
+SmartPointer<T>::SmartPointer (const SmartPointer<T> &tt) :
+ t (tt.t)
+{
+ if (t)
+ t->subscribe();
+};
+
+
+
template <typename T>
SmartPointer<T>::~SmartPointer () {
if (t)
* was called for this object.
*/
bool compressed;
+
+ /**
+ * Copy operator. Declare but don't
+ * define it and make it private above
+ * that to avoid that anyone tries to
+ * use this operator.
+ */
+ SparseMatrixStruct & operator = (const SparseMatrixStruct &);
+
template <typename number> friend class SparseMatrix;
};
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