Robert Sesek [Sat, 8 Oct 2016 21:23:27 +0000 (17:23 -0400)]
Reduce the size of ref<T> to a single pointer.
Rather than tracking |T*|, |OwnedPtrDeleter<T>|, and a |bool|; ref<T> now just
holds an |owned<T>*|. It uses uintptr_t's max value as a deletion sentinel
rather than a separate flag. And with the actual owned<T>*, the deleter doesn't
need to be held separately either.
Robert Sesek [Sat, 8 Oct 2016 19:29:59 +0000 (15:29 -0400)]
Fix ref::operator= for non-const lvalue binding to a temporary.
Implement operator= manually and reimplement the copy-ctor using it, rather than
vice versa. In addition, deleter_ gets changed to a pointer rather than
reference, so that a default ctor can be added.