On Friday, 26 February 2016 at 11:37:32 UTC, BBasile wrote:
Erratum! Actually you can, example:import std.stdio; string foo(double a)() { return "auto value = " ~ a.stringof ~ ";"; } void main(string[] args) { mixin(foo!0.1); writeln(value); // 0.1 writeln(typeof(value).stringof); // double } So you have to use .stringof on the template argument. Sorry for the previous answer.
Thank you!