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 <[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, gregod at, cpdaniel at, john at