Template error on compiling ...
anonymous
anonymous at example.com
Fri Feb 28 11:21:34 PST 2014
On Friday, 28 February 2014 at 19:16:11 UTC, Tobias Pankrath
wrote:
> 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.
Here it should probably be Matrix!T, though.
More information about the Digitalmars-d-learn
mailing list