aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/salticidae/ref.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/salticidae/ref.h b/include/salticidae/ref.h
index 001fd51..d68632d 100644
--- a/include/salticidae/ref.h
+++ b/include/salticidae/ref.h
@@ -136,6 +136,11 @@ class RcObjBase {
return *this;
}
+ RcObjBase(const RcObjBase &other):
+ obj(other.obj), ctl(other.ctl) {
+ if (ctl) ctl->add_ref();
+ }
+
template<typename T_>
RcObjBase(const RcObjBase<T_, R> &other):
obj(other.obj), ctl(other.ctl) {