diff --git a/include/monitor.h b/include/monitor.h index 9219283..59564f9 100644 --- a/include/monitor.h +++ b/include/monitor.h @@ -57,6 +57,16 @@ public: _watchable->add(this); } + /** + * Copy constructor + * @param monitor + */ + Monitor(const Monitor &monitor) : _watchable(monitor._watchable) + { + // register with the watchable + _watchable->add(this); + } + /** * Destructor */