Why does it not compile?

Morlan home at valentimex.com
Thu Mar 24 04:19:40 PDT 2011


The program below compiles. Clearly the "if" constraints in my original example
are causing trouble. It seems like a bug to me.

import std.stdio;

void Foo(T:T*)(T arg) {
  writeln("arg of Foo:", arg, typeid(T));
}
void main() {
  Foo!(long*)(54);
}


More information about the Digitalmars-d mailing list