C++0x Tuples Store Elements Backwards

The tuple layout that you are exploring is an unspecified implementation detail of tuple. Other implementations will have other layouts. If you write to this one, depending on gcc's layout, your code may not be portable to other std::libs.

The libc++ tuple implementation (for example) has the opposite (in-order) layout.


Why do you care what the implementation of tuple is? Program to an interface, not an implementation.

If you only use tuple via its advertised interface, then you will get your objects out in the same order you put them in. If you instead break encapsulation by accessing its contents directly, for example by the dodgy pointer cast in your example, then all bets are off.