Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2001-08-23 01:33:01


> From: John Max Skaller <skaller_at_[hidden]>
>
> Doing so means the answer is: "replace that C array
>with array<T>, and use smart_ptr< array<T> >", rather than
>"use array_ptr<T>" no matter what it is named.

Greg has already pointed out the existing boost::array template, which
was one of the first submissions to Boost. It is a fixed-size array, so
although it addresses the common concerns of actual declared C arrays,
it does not address the new T[] issue, which is closer in spirit to
vector than array -- scoped_ptr< array<T, N> > is actually not that
useful when compared to scoped_array<T>.

On a point of usage, scoped_array<T> is also not the moral equivalent to
scoped_ptr< array<T, N> > or scoped_ptr< vector<T> >: the usage is at a
different level of indirection, so it is not a comparison of like for
like.

Kevlin
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  mailto:kevlin_at_[hidden] mobile: +44 7801 073 508
  http://www.curbralan.com fax: +44 870 052 2289
  Curbralan: Consultancy + Training + Development + Review
____________________________________________________________


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