On 29/07/2016 6:38 PM, Andre Pany wrote:
Hi,is there a way to alias a string mixin? Neither foo nor foo2 compiles. import std.meta : Alias; alias foo = (s) => Alias!(mixin(generateCode(s))); alias foo2(string s) = Alias!(mixin(generateCode(s))); string generateCode(string s){return "";} void main() { enum s = "a = 2 + 3; b = 4 + a;"; foo(s); foo2(s); } Kind regards André
Well those string mixins are not evaluating out to a symbol. So that could be a rather big problem for the Alias template.