How can I have those "template instance recursive expansion" errors under control?
realhet
real_het at hotmail.com
Sun Dec 1 20:29:30 UTC 2024
On Sunday, 1 December 2024 at 19:55:59 UTC, realhet wrote:
> On Sunday, 1 December 2024 at 00:08:02 UTC, Richard (Rikki)
> Andrew Cattermole wrote:
>> The trick...
Update: This not works!
> This is another ugly fix:
> ```d
> import het.math; void main(){ auto col = RGB(1, 2, 3); auto img
> = image2D(1, 2, col); }
> ```
The trigger of the error is accessing Vector!(ubyte, 3) by the
alias WITHOUT mentioning Vector!(ubyte, 3) previously!
A harmless way to 'mention' is -> pragma(msg, (Vector!(ubyte,
3)).stringof[0..0]);
The alias declaration must be in a different module (minimum 2
modules needed to reproduce.).
More information about the Digitalmars-d-learn
mailing list