"Peter Dimov" <[EMAIL PROTECTED]> wrote in message
001b01c2cb95$de5e8fe0$1d00a8c0@pdimov2">news:001b01c2cb95$de5e8fe0$1d00a8c0@pdimov2...
> [...]
> And finally Mojo approximates:
>
> public:
>   mojoized(mojoized const & rhs); // can copy
>   mojoized(mojoized && rhs); // but can also move for efficiency reasons

Really?  http://www.cuj.com/experts/2102/alexandr.htm?topic=experts
has:

class mojo_ptr : public mojo::enable<mojo_ptr>
{
    // *** Here ***
    mojo_ptr(const mojo_ptr&); // const sources are NOT accepted
public:
    // source is a temporary
    mojo_ptr(mojo::temporary<mojo_ptr> src)
    {
        mojo_ptr& rhs = src.get();
        ... use rhs to perform a destructive copy ...
    }
    // source is a function's result
    mojo_ptr(mojo::fnresult<mojo_ptr> src)
    {
        mojo_ptr& rhs = src.get();
      ... use rhs to perform a destructive copy ...
    }
    ...
};

That looks like Howard's protocol to me, unless I'm missing
something.  I understand Howard's point now, which is the
important thing.

In fact, my understanding is that Howard's move_ptr *is* more
similar to mojo_ptr than auto_ptr, because auto_ptr has
auto_ptr(auto_ptr&), which is exactly the thing Howard is
crusading against.

Dave



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to