Template error on compiling ...

Tobias Pankrath tobias at pankrath.net
Fri Feb 28 11:16:09 PST 2014


On Friday, 28 February 2014 at 19:09:11 UTC, Robin wrote:
>
> 	override void opCall(ref Matrix m) pure nothrow {
> 		foreach (immutable col; 0 .. m.getDimension().cols) {
> 			m[this.row, col] *= this.factor;
> 		}

I guess this is the culprit. You must use Matrix!(). In general 
if the compiler says that "X is used as type", where X is 
something like a template, than you are using the template X 
instead of an instance where you should not.

There is probably an enhancement request to make the code above 
legal, though.




More information about the Digitalmars-d-learn mailing list