Boost logo

Boost :

From: Gabriel Dos Reis (Gabriel.Dos-Reis_at_[hidden])
Date: 2001-03-14 20:03:15


"David Abrahams" <abrahams_at_[hidden]> writes:

| ----- Original Message -----
| From: "Gabriel Dos Reis" <Gabriel.Dos-Reis_at_[hidden]>
|
| > One can see the problem from a type perspetive: Two array objects with
| > different shapes are instances of (conceptually) two different types
| > (that matters for matrix operations) and implicit conversions should
| > not be tolerated.
|
| I think that's only possible when you know the array's dimensions at
| compile-time.

I guess I was unclear. Each array knows its own shape, it's part of
its "dynamic" type. Size is one invariant. If they don't match
then that indicates the arrays aren't of the same type.

If you do want to assign an array to another you need to make
sure (explicitly) that their dynamic types agree -- that is, make sure
they are of the size.

--- Gaby


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