IFTI with D2?

Frank Benoit keinfarbton at googlemail.com
Mon Nov 5 17:28:30 PST 2007


The const thing makes IFTI hard.

uint searchPattern(T)( T[] arg1, T[] arg2 ){ ... }

The function shall accept mutable/const/invariant data for both arguments.

searchPattern( "abc".idup, "a".idup ); // (1) compiles
searchPattern( "abc".dup,  "a".dup  ); // (2) compiles
searchPattern( "abc".idup, "a".dup  ); // (3) doesn't compile

(1) and (2) will result in independant version of the function?

Is there a solution/workaround?
Is this a compiler bug?



More information about the Digitalmars-d mailing list