How to mixin each element of tuple

Michal Minich michal.minich at gmail.com
Tue Dec 20 05:32:05 PST 2011


My naive approach doesn't works

struct Item1 (T) {}
struct Item2 (T) {}

struct Group (Items ...)
{
    // how to do this? ... no static foreach :(
    static foreach (I; Items)
        mixin I!(int);
}


void main ()
{
    alias Group!(Item1, Item2) G;
}


More information about the Digitalmars-d-learn mailing list