|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-09-30 13:45:27
From: "Ed Brey" <brey_at_[hidden]>
> My contention is that not only are transfer semantics needed for the
particular application we were discussing, but that transfer semantics are
needed for *any* application. In RAII, the "acquisition" is performed by a
transfer.
Oh, please!
RAII has never been well-defined and there's nothing in its name which
implies the acquisition is done by transfer-of-ownership. In fact, if you
believe there's some power in the name, it's easy to interpret this as
RAII:
struct foo
{
struct body;
foo() : b(new body) {} // <===
~foo() { delete body; }
body* b;
};
-----------------------------------------------------------
David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk