Boost logo

Boost :

From: Gavin Collings (gcollings_at_[hidden])
Date: 2000-01-04 06:15:01


> >Darin Adler wrote:
> >THIS is an important design issue. Unless somebody has a solution to
> >fit
> >both needs, we have to decide between what I would call an
> > - array wrapper and
> > - an STL container similar to vector with static size.
> >Or may be we introduce both.
> >
> >However, if we introduce both, then we need a name for both
> >(I' suggest array for the array wrapper and ???vector for the
> latter).
> >
> >Opinions, please!
>
> Ouch! Let's avoid two if we possibly can. Sounds like the problem
> needs better definition.

As I see it, the language prevents reconciling the two, and both are useful. I
don't like "vector", as it's too different to std::vector and it sort of implies
variable size. It could be done as a specialisation (template <typename T,
std::size_t n, bool Initialisable = false> class array {...}), but I prefer
something like naked_array for the former (it reminds the user that it is
potentially uninitialized) and array for the latter.

Gavin

--
Gavin Collings
gcollings_at_[hidden]

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