Boost logo

Boost :

Subject: Re: [boost] C++03 unique_ptr emulation
From: Howard Hinnant (hinnant_at_[hidden])
Date: 2009-01-08 18:33:50

On Jan 8, 2009, at 4:53 PM, Steven Watanabe wrote:

> Howard Hinnant wrote:
>> * No doubt others (and myself) will find good ways to improve both
>> the implementation and testsuite. But this is the first version
>> I'm willing to call fairly complete. I believe there are 151
>> tests: 63 that are supposed to pass and 88 that are supposed to
>> fail.
>> * This was all tested on g++ 4.0. I have no idea what it will
>> take to get it working on other compilers. To the best of my
>> knowledge, it should work on any conforming C++03 compiler.
> There are 9 failures on on msvc 9.0 Express and 17 on como.
> Output attached.
> In Christ,
> Steven Watanabe

Thanks Steven,

The first como failure (unique.ptr\unique.ptr.runtime
\unique.ptr.runtime.ctor\default02.pass.cpp) looks like a test bug.
B<D>::B() should be outlined next to ~B() instead of inlined.

I started going through the rest of the como failures and they all
look like a failure in detail::is_convertible. My best guess is that
this version of como hasn't implemented CWG issue 291 (
), which is understandable considering this issue is C++0X targeted,
not C++03 targeted (accepted Oct. 05). <sigh> is_convertible is a
tricky area and apparently my implementation is depending on a dark
corner that won't be official until C++0X. I do not know if changing
"test1" to "test2" on line 50 of unique_ptr.hpp would help or not. It
doesn't help on g++. It might help on Como. This is a dark corner of
the language <shrug>. If it doesn't help, I don't have a backup
plan. In this case it would appear that there is no C++03 technique
for implementing is_convertible for move-only types (that I'm aware
of). And if that is the case, a C++03 emulation of move seems very
much in jeopardy. A working is_convertible is the foundation upon
which this move emulation is built.


Boost list run by bdawes at, gregod at, cpdaniel at, john at