Bug in D!!!

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 1 08:24:39 PDT 2017


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.


More information about the Digitalmars-d-learn mailing list