Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-03-02 09:42:19
Thorsten Ottosen wrote:
> Well, AFAIK, they are very similar. You set the capacity once when you
> initialize am object:
> boost::auto_buffer<T> buffer( get_max_capacity_from_somewhere() );
> isn't that exactly what you do with VLAs?
With VLAs, the buffer is on the stack whatever the capacity. With
auto_buffer, the buffer is on the stack only if the capacity is smaller
than N (which you define to be 256 by default).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk