nested enum like template generator

Dicebot public at dicebot.lv
Tue Jul 16 02:08:35 PDT 2013


On Tuesday, 16 July 2013 at 05:51:53 UTC, JS wrote:
> ...

Once again you post a complex and messy snippet and than jump to 
wrong conclusions. This works:

template inc(int i)
{
     enum inc = i + 1;
}

pragma(msg, inc!3);

Integers are treated normally in CTFE/templates, contrary to your 
last statement. You need to reduce to the real problem.


More information about the Digitalmars-d-learn mailing list