|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2000-12-04 13:56:10
Perhaps this is a situation where generative programming comes in handy.
We could provide both compile-time and run-time options for the number of
dimensions.
One particularly important place where run-time specified dims
is needed is for supporting a scripting interface.
Cheers,
Jeremy
On Sun, 3 Dec 2000 gibav_at_[hidden] wrote:
> I was not alluding to this in my previous mail. The main trade off
> that comes to mind is type safety. If at compile time you don't know
> the number of dimensions, how can the compiler know if a set of
> operator [] should yield a reference to an individual element or to
> ann intermediate ArrayRef? For this reason alone, I would not like
> that solution. Besides, I think that changing number of dimensions
> would create unintuitive behaviour in the Array, perhaps with the
> exception of the case where one of them is monodimensional.
----------------------------------------------------------------------
Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
Ph.D. Candidate email: jsiek_at_[hidden]
Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk