|
Boost : |
From: brangdon_at_[hidden]
Date: 2002-03-13 17:26:18
In-Reply-To: <15083E19-360A-11D6-ABFF-003065D18932_at_[hidden]>
On Tue, 12 Mar 2002 17:39:58 -0500 Howard Hinnant (hinnant_at_[hidden])
wrote:
> Base::Base(move from x)
> {
> x.notify_destruction();
> listners_ = move from x.listners_;
> notify_construction();
> }
That approach can also be used for relocate, if we have a no-throw default
constructor:
Base::Base(relocate from x)
{
x.notify_destruction();
listners_ = relocate from x.listners_;
notify_construction();
}
> Note that the move constructor non-destructively copied client_
> (just a pointer in this example).
As I said, there are examples where move happens to work, but it isn't
inevitably safe.
> I'm not really seeing too much of an issue either way. I think I may
> be missing your point.
Earlier (March 9th) you wrote:
relocate construct is not implementable for those classes that
have a base class or member classes that do not support move
construct.
I think this is over-stated, that's all. Relocate construct can be
implemented in terms of relocation of bases or members. It is not
necessary to have move() to implement relocate().
-- Dave Harris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk