On Friday, 22 February 2019 at 17:09:41 UTC, Sönke Ludwig wrote:
- Behaves like a POD if only POD fields exist, is non-copyable if any
   contained type is non-copyable etc.

In fact, if a contained type is non-copyable, it fails to compile altogether. (Example code below.)

Granted, so do Algebraic and SumType, so this isn't a knock against taggedalgebraic in particular. But it does indicate poor test coverage that you listed this feature without realizing it didn't work.

--- example.d
/+ dub.sdl:
dependency "taggedalgebraic" version="~>0.11.2"
+/
import taggedalgebraic;

struct NoCopy { @disable this(this); }
union U { NoCopy member; }
alias Test = TaggedUnion!U; // kaboom

void main() {}

Reply via email to