|
Boost : |
From: Michael Marcin (mmarcin_at_[hidden])
Date: 2007-10-04 13:15:11
Phil Endecott wrote:
> 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.)
>
Have a look at:
http://www.gamedev.net/community/forums/topic.asp?topic_id=261920
- Michael Marcin
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk