From: "David B. Held" <[EMAIL PROTECTED]>
> "Howard Hinnant" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > [...]
> > 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

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

Reply via email to