On Wednesday, 24 December 2014 at 20:08:07 UTC, Meta wrote:
I am curious, however, why changing `enum` to `auto` (or bool) doesn't work. You said that the mixin tries to interpret the expression `cast(bool)(embeddedTest.bits & <enumName>)` at compile time, but I don't understand why that would be so when the storage is auto and not enum. I guess mixin doesn't work quite like I thought it did; it's not quite the equivalent of pasting the mixed-in code.

Ok, I understand now. I missed the fact that even when it's an auto or a bool variable, it is CTFE-initialized because it's outside the constructor. I'm so close, yet so far from making this work.

Reply via email to