Boost logo

Boost :

From: Thomas Holenstein (tholenst_at_[hidden])
Date: 2000-05-26 08:01:57


OK, here are some suggestions about Nico's array class.
Some of them might have been discussed before. So please
ignore these.

I think

- rangecheck should be private (Does the aggregate
  restriction does hold for methods?)

- an array<int, N> should be comparable to a array<short, N>,
  so we probably need more templatized versions of operator==,
  operator<, etc.

- an array<int, N> should be comparable to an array<int, M>,
  returnig false (I'm not sure of this...)

- sometimes it would be useful to have full grown iterators,
  instead of just pointers. (see for example the libstdc++-v3
  faq on )

- Why do you include <iterator>?

- I think Jeremy's right, use mismatch for !=. It's faster.

Furthermore I suggest not making it an aggregate: after
all, if you want a array of 1000 Elements of a class which
has no default constructur, you could get quite busy.
Otherwise it would be possible to have a constructor
array<..>(const T& elem = T())


Boost list run by bdawes at, gregod at, cpdaniel at, john at