Simen kjaeraas <[email protected]> wrote:

Daniel Ribeiro Maciel <[email protected]> wrote:

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!

This should work, but doesn't (filing a bugzilla about it now):

template compareTuple( T... ) {
     template compareTuple( U... ) {
         enum bool compareTuple = is( T == U );
     }
}

static assert( compareTuple!( int, float )!( int, float ) );

However, this works:

alias compareTuple!( int, float ) foo;
static assert( foo!( int, float ) );


There.
http://d.puremagic.com/issues/show_bug.cgi?id=4061

--
Simen

Reply via email to