Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2007-10-04 11:45:32

Joel de Guzman wrote:
> Phil Endecott wrote:
>> * xyz or [n] notation: using .x, .y and .z to access the coordinates
>> seems simpler to me, but the higher-dimension people would prefer to
>> use [0], [1] ... [n]. That notation also has the advantage that you
>> can iterate through the dimensions. Is it possible to support both?
> Yes! Use fusion to do the mapping, making all your structs, arrays or
> whatnots, whatever they are, compatible.

I was imagining something more lightweight, like a union...

There's also the possibility of simply defining implicit conversions
between the two styles.

But a better solution would be to decide from the outset that one style
is "right" and the other is "wrong", so only one needs to be supported
and no conversions are needed. (I mean that partly tongue-in-cheek.)


Boost list run by bdawes at, gregod at, cpdaniel at, john at