summaryrefslogtreecommitdiff
path: root/upb/upb.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb/upb.h')
-rw-r--r--upb/upb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/upb/upb.h b/upb/upb.h
index d1107e7..b324daf 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -299,6 +299,11 @@ template <class T> class reffed_ptr {
if (ptr_) ptr_->Ref(this);
}
+ reffed_ptr(const reffed_ptr& other)
+ : ptr_(upb::upcast(other.get())) {
+ if (ptr_) ptr_->Ref(this);
+ }
+
~reffed_ptr() { if (ptr_) ptr_->Unref(this); }
template <class U>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback