Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2004-02-10 08:40:36

David B. Held wrote:
> Daniel Wallin: I have only been skimming this thread. Could you
> comment on its relevance to the move stuff you sent me earlier?
> In particular, does this thread suggest any changes to the code
> you sent me?

I don't think so. The code was mostly Rani's auto_ptr trick + some
changes in the constructors to allow policies to enforce move-only.

> Also, I tested your code with gcc-3.3, and it mostly
> liked it. I believe that it likes the moving part, but it triggers a
> bizarre error on an unrelated test that I think is a bug in 3.3 (due
> to improper instantiations during overload least,
> I hope that's all it is, because I'm upgrading to 3.3.2 right now,
> and that fixes a bug of that nature). Also, do you expect your
> technique to work properly for the conversion copy c'tor case:
> template <typename U, policies...>
> smart_ptr(smart_ptr<U, policies> const&p);
> template <typename U, policies...>
> smart_ptr(smart_ptr<U, policies>&p);
> These two c'tors are still in the code. Do you think that will interfere
> with the move semantics when doing a move-convert? i.e.:

No it should work as expected. This specialization forbids construction
from lvalues, conversions too.

   struct cant_move_from_const<
       const smart_ptr<U, BOOST_CONVERSION_POLICIES>

Daniel Wallin

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