Function template type parameter inference

csci csci at nowhere.com
Tue Jul 19 22:52:58 PDT 2011


I noticed in the D spec it states that

"Function template type parameters that are to be implicitly deduced may not have
specializations"

However, the following code works:

void Foo(T : double)(T t) { writefln("%f",t+2); }
...
Foo(5.5);

I was wondering if this is behavior that can be relied upon, or if it may change
in the future? Or am I misreading things?


More information about the Digitalmars-d-learn mailing list