From: Gavin Collings (gcollings_at_[hidden])
Date: 2000-01-10 04:35:01
> > array_ref takes raw memory and turns it into an array, it makes more
> > sense for it to provide array style initialisation too.
> Do you mean the initializer list? I wasn't intending array_ref to
> be fixed size.
No, I was thinking of calling std::construct() / uninitialized_xxx in an
array_ref constructor, and std::destroy in the destructor. That wouldn't be
appropriate in the case you describe, since initialisation, destruction is
external to array_ref. It would be more useful in the case where a derived
class provides raw memory and utilises array_ref to turn it into an initialized
array of T (and tidies up). Perhaps I misread your example as an example of
preferred usage? It could be implemented as an option using an extra
constructor and a flag, or a template argument...
-- 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