Why does it not compile?

Morlan home at valentimex.com
Thu Mar 24 03:10:54 PDT 2011


import std.stdio;

void Foo(T:T*)(T arg) if(!is(T==int)) {
  writeln("arg of Foo:", arg, typeid(T));
}
void Foo(T:T*)(T arg) if(is(T==int)) {
  writeln("int Foo!");
}

void main() {
  Foo!(long*)(54);
}


More information about the Digitalmars-d mailing list