|
Boost : |
From: Larry Evans (jcampbell3_at_[hidden])
Date: 2003-03-04 15:24:02
Brian Gray wrote:
> A raw memory buffer is a good idea. I've rolled my own on a couple of
> occasions, but never tried to mimic the style of the STL. That approach
> opens up a couple issues:
>
> Since we don't know what's stored in the memory buffer (image/audio
> data, chars from an input stream, serialized structs, etc.), it would be
> useful to be able to parameterize the iterators to the increment size.
Could this also be used to make vector<Derived> implicitly convertible to
vector<Base>? It seems so if everything is implemented in terms of char* and
the only difference is the increment (of char) to move from one element to the
next. Of course I guess this would mean the increment op would have to be virtual,
but maybe not. If the iterator, as suggested above, the increment size was parameterized,
this would eliminate the need for virtual increment.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk