On Friday, 1 September 2017 at 15:24:39 UTC, Adam D. Ruppe wrote:
static foreach is now in the new release! You can now do stuff
like:
---
alias I(A...) = A;
interface Foo {
static foreach(T; I!(int, float))
void set(T t); // define virt funcs for a list
of types
}
class Ass : Foo {
static foreach(T; I!(int, float))
void set(T t) {
// simplement
}
}
---
really easily.
I get an access violation, changed the code to
import std.meta;
static foreach(T; AliasSeq!("int", "float"))
mixin("void set("~T~" t);");
and also get an access violation ;/