Boost logo

Boost :

From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-05-25 15:48:50


Martin Bonner wrote:

> Having said which, personally I think that a seperate class with
> constructors would be better than adding another template class to
> boost::array.

I have been thinking this over all day, and think another class is the
most sensible solution - even if it means duplicating the
implementation. The extra boolean value in the type is just too ugly!
Open to suggestions on a name though, other than array2 or arrayex <g>

If we look forwards to C++0x and the new initialization syntax Bjarne
proposed in Berlin, I think we can see a way to implement an array
template with constructors, as the new sequence constructor should
remove the limits of aggregate compatibility from us. The data()
member will still allow us to pass the internal array as a POD to C
APIs.

Of course, once we allow for an array with constructors, we need to
decide which constructors are most appropriate. Eg construction from
an iterator range? Construction from a generator function? N copies
of a give value?

-- 
AlisdairM

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