rmartinho
Re:Rule of Zero (C++)
on Friday November 23, 2012 @11:03AM (#4822609)
I'll say this just once: smart pointers and reference counting are not the same thing, and neither of them implies the other.
Re:Rule of Zero (C++)
on Friday November 23, 2012 @10:44AM (#4822525)
> often can't be used because objects need to be passed by reference to libraries that use regular-old-pointers.
I don't understand what you mean by this. If you have a `smart_ptr<T> p;` nothing prevents you from passing `*p` or `p.get()` to some legacy interface. You only have trouble if that legacy interface wants to claim ownership of the object.