On Thursday, 23 August 2012 at 13:56:05 UTC, Philippe Sigaud wrote:
On Tue, Aug 21, 2012 at 6:43 AM, Bobby Bingham <uhm...@gmail.com> wrote:
[...]

[...]

A possibility is to use a function template, passing the double as a template argument:

string test(double d)() // d is a template argument
{
    return d.stringof;
}

enum testvar = mixin(test!(3.14));

void main()
{
    pragma(msg, testvar);
}

https://issues.dlang.org/show_bug.cgi?id=15497

Reply via email to