mixin does not work as expected
Era Scarecrow
rtcvb32 at yahoo.com
Wed Jan 5 23:29:08 UTC 2022
On Wednesday, 5 January 2022 at 08:40:15 UTC, rempas wrote:
> I'm trying to use mixins and enums to "expand" code in place
> but the results are not what I expected and I'm getting an
> weird error. I have created the smallest possible example to
> reproduce the error and it is the following:
Back when i was working on bitmanip with the bitfield mixin, i
had to re-write it with newlines and tabs, and then have it
expand it as text and output it and see what the actual output
was before i could debug it.
The output was... informative.
That said, rolling your own mixins should really be the last
resort. You're dumping a lot into a single line of code you can't
trace, follow, debug, or look at.
More information about the Digitalmars-d-learn
mailing list