How to strip struct/class invariants?
Artem Tarasov via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 5 05:15:30 PDT 2015
OK, so there was an old bug fixed in 2.067
(https://issues.dlang.org/show_bug.cgi?id=4421) so that now
unions apparently can't contain a struct that has invariants. It
kinda makes sense, although I don't see why the invariants can be
simply ignored, as they don't have as much importance as
destructors/postblits.
But more to the point. I have a struct that has an invariant, and
I wish to use it as a member of an union. With the latest
compiler, I have to somehow remove the invariant. Is there some
compile-time magic that I can use for this?
More information about the Digitalmars-d-learn
mailing list