In std.typecons there is this template, that tells if a given type is any tuple, this means if it's the instantiation of a Tuple with any argument type:

template isTuple(T)
{
    static if (is(Unqual!T Unused : Tuple!Specs, Specs...))
    {
        enum isTuple = true;
    }
    else
    {
        enum isTuple = false;
    }
}


Do you think it's worth a D enhancement request to be able to write that code like this?

enum isTuple(T) = is(Unqual!T Unused : Tuple!Specs, Specs...);

Bye,
bearophile

Reply via email to