Jerry Coffin wrote:
> In article <MPG.2247b88c10ccee14989c05@[EMAIL PROTECTED]
>,
> jcoffin@[EMAIL PROTECTED]
says...
>
> [ ... ]
>
>> Though this doesn't sup****t the full interface for std::vector, it
>> sounds like it's probably close enough for your purposes -- and if not,
>> you have the full source code to work with in adding things like
>> pop_back, begin(), end(), etc.
>
> Sorry, I meant to mention, but forgot: of course you could just use
> std::vector instead, since vectors are copyable and assignable as well
> -- but this will usually add a fair amount of overhead you'd probably
> rather avoid. In particular, it normally allocates memory from the free
> store to hold the data, so copying or assigning a vector isn't quite as
> cheap as you might like. Your constraints are sufficiently tight that a
> specialized class reduces overhead substantially.
The OP likely already has access to a TR1 array, using which would be
even easier than rolling his own.
--
#include <tr1/array>


|