Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-01-31 12:52:46


"Howard Hinnant" <hinnant_at_[hidden]> wrote in message
news:7F2AC73A-353D-11D7-9A0A-003065D18932_at_twcny.rr.com...
> [...]
> *******************************************************
> * *
> * Do not move from an lvalue with copy syntax. *
> * *
> *******************************************************

Howard, I'd appreciate it if you stopped beating around the bush, and
just say what you're trying to say. All these subtle games are too much
for me. ;>

> [...]
> To implement the sample C++98 move_ptr, I literally started with
> auto_ptr source and just disabled the "copy" from lvalue by making
> it private, and then shook what was left around until it passed a few
> simple unit tests. It is just a proof of concept that you don't have
> to move with copy syntax in C++98.

So, if I understand you correctly, the relevant translation of "Howard's
Principle" for move_ptr is:

***************************************************
*
* Do not allow move_ptr(move_ptr&) or operator=(move_ptr&)!!!!
*
***************************************************

If so, that is the important piece of info I needed. I suppose that
declaring move_ptr(move_ptr const&) private, and not declaring
move_ptr(move_ptr&) at all has the same effect. So it seems that
Mojo observes Howard's Principle.

Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk