|
Boost : |
From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2003-03-01 12:50:34
At 10:16 AM 3/1/2003, Alisdair Meredith wrote:
>Greg Colvin wrote:
>
>> Which is why the original releaser<> proposal is not in the standard.
>> There are just too many different kinds of resource, with too many
>> different ways of acquiring and releasing them. So it wasn't clear
>> that any general facility could improve on just wrapping each resource
>> in a class with constructors that acquire the resource and a destructor
>> that releases it.
>
>The principle advantage the releaser<>-type class is that it gives us
>something to attach policies to. It is difficult to apply policies in a
>vacuum. In fact AFAICT the only purpose of this hypothetical class is
>purely as a policy-holder!
Yes, and policies are one area where C++ design has made
big advances since the standard library was designed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk