I\'d like to know how are tuple implemented in standard library for C++0x. I tried to read description in libstdc++ manual and then read template listing, but it\'s really hard
A tuple is typically implemented as a compile time linked-list.
The code is a bit obfuscated through template-syntax, but following elements are normally present:
There exist reasonable implementations in C++03 (e.g. boost).
Variadic templates allow an unlimited number of elements, as mentioned by Motti.
The cost is normally a compile time-one. Copy constructors might be called during initialization (max 1), and when copying the tuples themselves.