Why D const is annoying

Mehrdad wfunction at hotmail.com
Sat Dec 10 03:04:21 PST 2011


On 12/10/2011 3:01 AM, Walter Bright wrote:
> On 12/10/2011 2:34 AM, Mehrdad wrote:
>> ... and another...
>>
>> struct Matrix(T, size_t N = 1)
>> { public auto mul(Matrix!(T, N) other) const { return this; } }
>
>
> In general, to refer to the current template being expanded from 
> inside of it, just give its name, as in:
>
> Matrix!(T,N) => Matrix
That's not the issue.

If you say 'int' instead of size_t, it works fine.


More information about the Digitalmars-d mailing list