The future of UDAs.

Jacob Carlborg doob at me.com
Tue Nov 27 04:33:06 PST 2012


On 2012-11-27 12:28, Gor Gyolchanyan wrote:
> Basically the most important thing I miss is mutable compile-time
> variables. That's it. Everything else can be worked around.

This compiles just fine and prints "10" at compile time:

int foo ()
{
     int i = 0;
     for (; i < 10; i++) {}
     return i;
}

enum i = foo();
pragma(msg, i);

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list