Why TypeTuple can be assigned to a variable

Zhenya zheny at list.ru
Wed Jun 12 01:01:59 PDT 2013


Hi!

I was just surprised when realized, that this code compiles and 
runs:

import std.typetuple;
import std.stdio;

void main()
{
  auto foo = TypeTuple!("foo","bar");
writeln(typeid(typeof(foo)));
  writeln(foo);
}

If I were compiler expert,I'd say that it's a bug.But I am not)
So, can anybody explain why it's work?

Thank you.


More information about the Digitalmars-d-learn mailing list