.stringof might call function?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Mar 16 08:02:13 PDT 2013


On 3/16/13, simendsjo <simendsjo at gmail.com> wrote:
> Why is the function called in the template at the line of
> .stringof?
>
> template t(alias fn) {
>      static if(fn.stringof) // f(int i) isn't callable using ()

Use __traits(identifier, fn).


More information about the Digitalmars-d-learn mailing list