On 27/02/2013 18:06, Dicebot wrote:
Ye, lambda litteral issue is different one.

OK.

My code example: http://dpaste.1azy.net/b06370ea

The problem may be related to optional parentheses and stringof, and may be a compiler bug.

You can pass function names as a template alias parameter:

import std.stdio;

int f(int i) {return i^^2;}

template check(alias Symbol)
{
        enum check = Symbol(5); // CTFE
}

void main()
{
    //~ pragma(msg, f.stringof); //error

    writeln(check!f); // 25
}

Reply via email to