November 21, 2012
If I have a type tuple TL, which happens to be:
  alias TypeTuple!(const(int), immutable(double), string) TL;

How can I convert it into a tuple of (int, double, string)?

Effectively I need a way to get a new UnqualTL where each type in the list is itself unqualified. I need to do this without knowing the alias.

Thanks
Dan
November 21, 2012
You can use std.typetuple.staticMap to map Unqual on each type:


import std.typetuple;
import std.stdio;

template UnqualifyTuple(T...)
{
    alias staticMap!(Unqual, T) UnqualifyTuple;
}

void main()
{
    alias TypeTuple!(const(int), immutable(double), string) TL;
    writeln(TL.stringof);

    alias UnqualifyTuple!TL UQTL;
    writeln(UQTL.stringof);
}