On Saturday, 21 June 2014 at 11:12:18 UTC, Artur Skawina via
Digitalmars-d-learn wrote:
On 06/21/14 05:32, Paul D Anderson via Digitalmars-d-learn
wrote:
I can't use a template mixin:
mixin template Function(string name)
{
const char[] Function =
"public static int " ~ name ~ "() { return other.module."
~ name ~"; }";
}
Error: mixin templates are not regular templates.
mixin template Function(string name) {
mixin("public static int " ~ name ~ "() { return
other.module." ~ name ~"; }");
}
struct S {
mixin Function!"fctn1";
}
artur
Beautiful! That's it.
Thanks,
Paul