Boost logo

Boost :

Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: David Abrahams (dave_at_[hidden])
Date: 2009-03-14 00:12:50


On Mar 6, 2009, at 2:30 AM, Thorsten Ottosen wrote:

>>> For the
>>> operations that they have in common, it is almost a drop-in
>>> replacement.
>>> I say almost, because this class is really about speed, and often
>>> don't
>>> allow overlapping ranges, assignment to *this etc. The exception-
>>> safety
>>> guarantees might also be weaker if it hurts performance.
>>>
>> I think anything that's an "almost" needs an explicit rationale. I
>> really don't, for example, see why the self-assignment check is worth
>> omitting.
>
> The rationale would be simplicity, speed and less generated code.

Have you measured the speed/space difference and found it to be
significant in any real application?

A class that attempts to provide value semantics but doesn't support x
= x is putting a big hole in the system of equational reasoning.
Justifying that (to me) would take some pretty heavy proof.

--
David Abrahams
BoostPro Computing
http://boostpro.com

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