--- Comment #5 from 2012-02-16 22:03:04 PST ---
The reason why this works with structs but not with templates is that a struct
preserves the full type information while an alias template transforms a type.

void bar(Ty)(Ty) { pragma(msg, Ty); }

struct SList(T) {}
template TList(T) { alias T TList; }

void main()
    bar(SList!int.init); // type SList!int => SList!int is preserved
    bar(TList!int.init); // type int       => TList!int is lost

Now if you take a function void foo(T)(TList!T) {} and gives you 'TList(T) =
What your asking for is an inverted template 'TList^-1(int) = T'.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to