diff --git a/include/xo/refcnt/Refcounted.hpp b/include/xo/refcnt/Refcounted.hpp index da4ba539..0b62e557 100644 --- a/include/xo/refcnt/Refcounted.hpp +++ b/include/xo/refcnt/Refcounted.hpp @@ -297,8 +297,11 @@ namespace xo { return ptrdiff_t(x.get() - y.get()); } /*compare*/ - private: - Borrow(T * x) : ptr_(x) {} + template + Borrow & operator=(const Borrow & x) { + ptr_ = x.get(); + return *this; + } private: T * ptr_ = nullptr;