An implementation of a tuple type, A tuple is an an aggragation of types with each element indexed by a compile time integer constant.
This differs from a struct which is an aggragation where elements (members) are accessed by a compile time name (aka identifier).
ntuple<> is a wrapper (in this case it is derived from) an underlying tuple, this underlying tuple isn't restricted to 8 arguments as ntuple<> is. All of ntuple's functionality is in reality functionality of the underlying tuple.
The underlying tuples type is exposed through ntuple<>'s type member typedef.
Tuples with more than 8 elements can be declared with ntuple<>'s cat<> and cat_tuple<> member template's. Tuple with more than 8 elements can be created with ntuple<>'s operator << ()
imp::ntuple< int, double, bool > idb( 1, 2.0, false );
- Basics
- More On ...
- Testing