On Friday, 4 November 2016 at 15:50:36 UTC, Gianni Pisetta wrote:
Hi all,
I am having issues finding a solution for this, i want to check if an alias is an istance of a variadic template nested in another variadic template.
[...]
there is some sort of workaround?

Thanks,
Gianni

Hello, I'm not sure that's exactly what you want but check this:

============================
template A(As...) {
    template B(Bs...) {
    }
}

alias BI = A!(1,2).B!(3,4,5);

import std.traits;

template NestedTemplateArgsOf(alias T)
{
alias NestedTemplateArgsOf = TemplateArgsOf!(__traits(parent, T));
}

alias Bs = TemplateArgsOf!BI;
alias As = NestedTemplateArgsOf!BI;


static if (is(typeof(BI) == typeof(A!As.B!Bs)))
{
    pragma(msg, "for the win");
}
============================

The missing key was NestedTemplateArgsOf. With it you can solve the problem.

Reply via email to