Boost logo

Boost :

Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2009-03-02 18:22:58


On Mon, Mar 2, 2009 at 6:11 PM, Scott McMurray <me22.ca+boost_at_[hidden]>wrote:

> It seems to me that if you need unchecked, then the class shouldn't be
> storing the capacity at all (outside of debug versions), as it's
> unnecessary overhead, which suggests to me that it would be the domain
> of a separate, obviously unsafe class (unchecked_vector?).

True, or behavior could be specified by a template argument -- one
instantiation has a static max_size() function that yields the appropriate
value based on the N argument and has an unsafe, unchecked push_back, the
other is more flexible/safe and behaves more similarly to vector.

-- 
-Matt Calabrese

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