Ion Gaztañaga wrote:
I would like to make this implementation the official boost::unique_ptr
implementation, but until the community approves this, it's in
boost::movelib namespace (boost::move it's a function so I needed to tweak
the namespace name).
I actually have my own prototype implementation (attached) that I used to
test my ideas of how unique_ptr and unique_ptr should behave with
respect to conversions between them (modeled after shared_ptr.)
It's however a prototype; meaning that it relies on C++11 features, does not
optimize out empty deleters, has no tests. I used the libc++ test suite to
test it, but that's not suitable for Boost.
It didn't occur to me that Howard has already written the test suite in a
more suitable form. :-)
I intended to eventually bring this up to production quality and make it
boost::unique_ptr, but couldn't spare the time.
unique_ptr's "operator <" is implemented as x.get() < y.get() instead of
std::less<CT>().
That exactly what I did too. :-)