copy-ctor's

Manu turkeyman at gmail.com
Mon May 27 05:28:01 UTC 2019


On Sun, May 26, 2019 at 10:20 PM Ola Fosheim Grøstad via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> On Monday, 27 May 2019 at 04:52:14 UTC, Manu wrote:
> > I don't really think there's a problem here, just @disable the
> > default copy/postblit/destructor in the presence of a union,
> > and also make any access to a member of a union un- at safe. The
> > rest will fall out naturally.
>
> Depends on how strict you want to be.  In terms of correctness
> you shouldn't allow anything with a destructor in a union in the
> first place.

Why? Then it would be impossible to use unions to write anything useful.



More information about the Digitalmars-d mailing list