Currently the right way to do this is:template foo(T) { int opApply(int delegate(ref T) dg) { // code } } class bar(T) { mixin foo!(T); } void main() { auto b = new bar!(int); foreach(qux; b) { } }
Ah, but that does not give me the named mixin.
Consider
class Tree(T)
{
mixin Traverse!(Stack) depthfirst;
mixin Traverse!(Queue) breadthfirst;
}
--
Simen
