On Sun, Jul 22, 2012 at 5:10 PM, Max Samukha <[email protected]> wrote:

> The language does not allow you to use CTFE parameter values as arguments to
> __traits/templates. Therefore, to be able to build meta-objects at
> compile-time, you would have to:
>
> static info = getModuleInfo!"std.algorithm";

Maybe I don't get your comment, but AFAICT, the language does allow
you to use CTFE parameters values as arguments to templates:

template Twice(double d)
{
    enum Twice = d * 2;
}

double foo(double d)
{
    return d+1.0;
}

void main()
{
    enum t = Twice!(foo(1.0));
    pragma(msg, t);
}

Reply via email to