|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-03 10:06:45
From: "David B. Held" <dheld_at_[hidden]>
> "Howard Hinnant" <hinnant_at_[hidden]> wrote in message
> news:95330DAA-352E-11D7-9A0A-003065D18932_at_twcny.rr.com...
> > [...]
> > I presented code under the thread "SmartPtr (Loki) - auto_ptr/move
> > c'tor issue" on Jan. 28 which does this. For easy reference, here is
> > the code again, slightly improved:
> >
> > http://home.twcny.rr.com/hinnant/Utilities/move_ptr
> > [...]
>
> This looks suspiciously like Mojo. Could you describe the differences?
;-)
No, it's much closer to auto_ptr than Mojo. Using our proposed && syntax,
auto_ptr has this constructor:
public:
auto_ptr(auto_ptr && rhs); // move from everything
move_ptr (approximated by Howard above) has:
private:
move_ptr(move_ptr const & rhs); // can't copy lvalues
public:
move_ptr(move_ptr && rhs); // but can move from rvalues
And finally Mojo approximates:
public:
mojoized(mojoized const & rhs); // can copy
mojoized(mojoized && rhs); // but can also move for efficiency reasons
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk