Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-01-09 12:25:53


> Though I think the array_ref is still an important
> class. It just wouldn't share implementation with array.
> For the array_ref you couldn't use the initializer list,

I support providing a wrapper for the ordinary pointers in which so much
existing code traffics. It doesn't bother me that we might have two
different array wrappers. I think the proposed name could be improved, and
that would solve some of the problems of the existing proposal.

array_ptr would be a better name. After all, 1. it is a wrapper for a
pointer 2. we don't expect these objects to behave like references when
assigned, do we?

There may be even better names possible, but first we ought to address the
following:

Q: Why are we doing this? A: to write generic code which uses a subset of
the Container requirements.

Do we have a name for the concept you want to make available? [I regret that
the standard library has defined "Container" to be something so very
specialized, and which does not include so many things we'd like to call
Containers]

> so it would be ok to use the reversible_container_helper
> (which perhaps should be added to boost/operators.hpp).

I would not support adding that to operators.hpp, since it has little to do
with the original purpose of that header as reflected in its name. Probably
the stuff devoted strictly to iterators should be separated into another
file if you feel strongly that this class is related to that stuff.

-Dave


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