Comparing Two Type Tuples

BCS none at anon.com
Sun Apr 4 20:02:30 PDT 2010


Hello Simen,


> 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 ) );


It does work if you rename the inner template to something like "with". 

-- 
... <IXOYE><





More information about the Digitalmars-d-learn mailing list