January 15, 2007 question about 'mixed' tuples | ||||
---|---|---|---|---|
| ||||
I have some troubles finding out what one can do with tuples that consist of both types and expressions. I would like, for example, to create a type tuple out of a mixed tuple. Take this example from the article on digitalmars: alias Tuple!(float, float, 3) TP; TP.length // evaluates to 3 TP.length however gives me a compiler error: 'float is not an expression' It works nicely if TP is a tuple of only types or expressions, but not for mixed tuples. Am I doing something wrong, or is this not possible? |
Copyright © 1999-2021 by the D Language Foundation