Why is my structure template does not compile?
Weed
resume755 at mail.ru
Thu Dec 11 15:43:13 PST 2008
>>> ref Element opIndexAssign( in Element a, in uint n )
>>> {
>>> data[n] += a;
>>> return data[n];
>>> }
>>
>> I'm guessing as I don't use 2.0 but I think that this is a bug. DMD is
>> trying to say that the above returns are trying to return something
>> that can't be referenced (like a math expression result).
>>
>
> It is a bug, indeed. The struct 'invariant' prevents proper template
> instantiation somehow... Removing it makes code work as intended.
> I'll submit a bug report.
Thank you!
Give a link to the bugreport later?
More information about the Digitalmars-d-learn
mailing list