Tuples: AliasSeq

You will get to know about the use of AliasSeq in this lesson.

AliasSeq

AliasSeq is defined in the std.meta module. It is used for representing a concept that is normally used by the compiler but otherwise not available to the programmer as an entity, including a comma-separated list of values, types, and symbols (i.e., alias template arguments). The following are three examples of such lists:

  • Function argument list

  • Template argument list

  • Array literal element list

The following three lines of code are examples of these lists, respectively:

foo(1, "hello", 2.5); // function arguments 
auto o = Bar!(char, long)(); // template 
arguments auto a = [ 1, 2, 3, 4 ]; // array literal elements

Tuple takes advantage of AliasSeq ...