Better string representation for TypeSeq used as function arg type?
Shriramana Sharma via Digitalmars-d
digitalmars-d at puremagic.com
Sat Dec 12 03:00:17 PST 2015
Hello. By executing the following:
alias AS = AliasSeq!(int, double);
int foo(AS td) // same as int foo(int, double);
{
writeln(typeof(td).stringof);
return td[0] + cast(int)td[1];
}
I get:
(int, double)
But it is not very clear as to what exactly the type of `td` is! I
understand that the AliasSeq is presented to the function body *as if* it
were a Tuple!(int, double) in that it can be accessed using [0] [1] etc, but
it is not *really* (in the sense of RTTI) a Tuple, is it? In which case,
what is it? Is it another "Voldemort" type?
--
Shriramana Sharma, Penguin #395953
More information about the Digitalmars-d
mailing list