What fails if I want to define this:

        Algorisme!(T,V) opBinary(string op)(Algorisme!(T,U) alg) {
                if (op=="*") {
                        //fer la funciĆ³ composicio
return new Algorisme!(T,V)("ComposiciĆ³ de "~this.nom ~ " i " ~ alg.nom, 1, function(T t) { return this.funcio(alg.funcio(t)); } );
                }
        }

}


within my
class Algorisme(U,V) {
        string nom;
        uint versio;
        alias V function (U) Funcio;
        Funcio funcio;
...
}

?


I want to combine Algorisme(U,V) and Algorisme(T,V) with operator. Is it possible?

The errors I get are:

 gdmd-4.6 algorisme
algorisme.d:32: Error: undefined identifier T, did you mean variable E? algorisme.d:51: Error: 'alg' is not of arithmetic type, it is a algorisme.Algorisme!(int,int).Algorisme algorisme.d:51: Error: 'alg2' is not of arithmetic type, it is a algorisme.Algorisme!(int,int).Algorisme



Thanks in advance,
Xan.

Reply via email to