Boost logo

Boost :

From: Reid Sweatman (reids_at_[hidden])
Date: 1999-09-01 19:45:15


> But you still need the internal data to be in contiguous
> memory, unless you
> make implemenations possibly require copying the entire
> vector to a new
> contiguous buffer which basically defeats the purpose (it's
> slow and you can't
> update the original vector)

True, which is why I originally asked if anyone had done or knew of a decent
template implementation of an array class. I've seen the thing called
"block" in the Austern book, but it's more of a teaching example than
full-blown usable code. I'll likely end up writing one myself, but it won't
be for the project I'm on now, which is in the tooth-grinding stage. I
really needed such a class, for this project, though. It's a gallimaufry of
legacy code that began life as C and although it now masquerades as C++, it
basically has no idea of encapsulation, and in the few places where someone
tried to enforce some, the next programmer along promptly broke it. To live
with code that always expects to be handed pure pointers to raw arrays, you
need a class like I was asking after. Unfortunately, none of the standard
STL containers fit that bill.


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