I haven't been closely monitoring this thread, though I did note its existence.
Fwiw, I was never thrilled with my C++03 emulation of unique_ptr. I don't recall exactly what doesn't work. But I think I'm correct when I say that it does not succeed in completely emulating a C++11 unique_ptr. There may be clues as to what doesn't work here: http://home.roadrunner.com/~hinnant/unique_ptr.zip
Howard
Hi, I took a look at your implementation and incorporated parts of it into
my implementation.
I wrote some compiler tests to see how well an implementation of unique_ptr
stood up to the standard's requirements.
The main issues I found with Howard's implementations are (from a
compilation success standpoint, I haven't tried compilation failure test
cases):
1. Incompatibility with Boost.Move, and possibly certain Boost type traits.
2. It seems like a few areas rely on reference collapsing, which isn't
available in C++03 (well, that's what GCC 4.8.1 is telling me. Dunno if his
use is non-standard compliant).
3. There are some places the compiler complains about ambiguous use of
forward. Seems to primarily be a problem if D is a reference.
Howard's implementation did bring something interesting up I noticed about
the standard on array unique_ptr:
There is no move constructor/assignment of the form:
// constructor form here, similar issue with move assignment
unique_ptr