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?
How to strip struct/class invariants?
Artem Tarasov via Digitalmars-d-learn Sun, 05 Jul 2015 05:21:13 -0700
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.
- How to strip struct/class inv... Artem Tarasov via Digitalmars-d-learn
- Re: How to strip struct/... John Colvin via Digitalmars-d-learn
- Re: How to strip str... Artem Tarasov via Digitalmars-d-learn
- Re: How to strip... John Colvin via Digitalmars-d-learn
- Re: How to strip struct/... Steven Schveighoffer via Digitalmars-d-learn