Hello Daniel,

Heya ppl!

I was wondering how could I write a function that takes two Type
Tuples as arguments and returns true if they are match.

Could anyone help me with this?

Thanks!


here is my untested vertion:

template Compare(T...)
{
   template With(U...)
   {
       static if(T.length != U.lenght) const bool With = false;
       else static if(T.length == 0) const bool With = true;
       else static if(is(T[0] == U[0])) const bool With = 
Compare!(T[1..$]).With!(U[1..$]);
       else const bool With = false;
   }
}

use like: Compare!(int, float, myStruct).With(alias1,alias2,typeArg)

--
... <IXOYE><



Reply via email to